Class T3DLinearMoving
Unit
Castle3D
Declaration
type T3DLinearMoving = class(T3DMoving)
Description
3D moving with constant speed between 2 points. Moves with a constant speed from (0, 0, 0) to TranslationEnd. They are called begin position and end position.
This is a simplified, more comfortable descendant of T3DMoving. You get easy to use GoBeginPosition, GoEndPosition properties, you can easily set sounds by SoundGoBeginPosition and SoundGoEndPosition and such.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
 |
MoveTime: Single; |
|
Methods
 |
constructor Create(AOwner: TComponent); override; |
|
 |
destructor Destroy; override; |
|
 |
function CompletelyEndPosition: boolean; |
|
 |
function CompletelyBeginPosition: boolean; |
|
 |
procedure GoBeginPosition; |
Start going to begin position, assuming that currently we're in end position (i.e. CompletelyEndPosion).
|
 |
procedure GoEndPosition; |
Start going to end position, assuming that currently we're in begin position (i.e. CompletelyBeginPosion).
|
 |
procedure RevertGoEndPosition; |
Stop going from end position to begin position and go back to end position. Call this only when currently EndPosition is False and we were in the middle of going to begin position.
As an example, this is what happens when door on DOOM level gets blocked. In the middle of closing (which ig going to begin position) it will realize that something blocks it, and open back (go back to end position).
|
 |
procedure RevertGoBeginPosition; |
Just like RevertGoEndPosition, but this should be used in the middle of the move from begin position to end position, to go back to begin position.
|
 |
procedure GoOtherPosition; |
This goes to the other position. Which means that if we're completely in end position or in the middle of move to end position, this goes back to begin position. And if we're in begin position, this goes back to end position.
|
 |
procedure Update(const SecondsPassed: Single; var RemoveMe: TRemoveType); override; |
|
Properties
 |
property EndPosition: boolean read FEndPosition; |
Is this object in end position, or going to it. If False , then this object is in begin position or going to it. See also CompletelyEndPosion and CompletelyBeginPosition.
Initially this is False , and EndPositionStateChangeTime is set such that we're sure that we're in CompletelyBeginPosion,
|
 |
property EndPositionStateChangeTime: Single read FEndPositionStateChangeTime; |
Last time EndPosition changed.
|
 |
property SoundGoBeginPosition: TSoundType
read FSoundGoBeginPosition write FSoundGoBeginPosition default stNone; |
|
 |
property SoundGoEndPosition: TSoundType
read FSoundGoEndPosition write FSoundGoEndPosition default stNone; |
|
 |
property SoundGoBeginPositionLooping: boolean
read FSoundGoBeginPositionLooping write FSoundGoBeginPositionLooping
default false; |
|
 |
property SoundGoEndPositionLooping: boolean
read FSoundGoEndPositionLooping write FSoundGoEndPositionLooping
default false; |
|
 |
property SoundTracksCurrentPosition: boolean
read FSoundTracksCurrentPosition write FSoundTracksCurrentPosition
default false; |
If True then the sound (set by SoundGoBeginPosition or SoundGoEndPosition) 3D position changes as the 3D position of the object changes.
Otherwise (default) sound is initially made at initial 3D position of this object, and then the sound position doesn't change (even if the position of the object changes).
|
|