Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers
|
Class TAbstractTimeDependentNode
Unit
X3DNodes
Declaration
type TAbstractTimeDependentNode = class(TAbstractChildNode, IAbstractTimeDependentNode)
Description
Abstract node from which most (but not all) time-dependent nodes are derived.
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
procedure CreateNode; override; |
|
 |
destructor Destroy; override; |
|
 |
function GetCycleInterval: TFloatTime; virtual; abstract; |
Final length (in seconds) of this animation. For a looping animation, this is the time it takes to make a single cycle. Should always be > 0.
This is not called "duration", as that word is reserved to mean "unscaled time length" for X3D AudioClip and MovieTexture nodes. The final length, returned here, is the AudioClip.duration divided by AudioClip.pitch, or MovieTexture.duration / MovieTexture.speed.
On TTimeSensorNode descendants, you can also get and set this by the class helper property TTimeSensorNode.CycleInterval. The name collision is harmless here, as both ways get the same value.
|
 |
function ElapsedTime: TFloatTime; |
Time in seconds since the sensor was activated and running, not counting any time while in pause state.
For non-looping animations, note that the sensor automatically stops when the animation finishes, so ElapsedTime will not grow beyond the "duration". If you want to observe when the animation ended, you probably do not want to use this property. Instead observe when IsActive changed to False , by registering a callback on EventIsActive.AddNotification . See the examples/3d_rendering_processing/listen_on_x3d_events.lpr .
BTW, the "duration" mentioned above is usually just GetCycleInterval, but sometimes it's a GetCycleInterval multiplied by some scaling factor, like in case of TAudioClipNode or TMovieTextureNode).
For a precise (and complicated:) specification of how this behaves, see the X3D TimeSensor.elapsedTime specification at http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/time.html#TimeSensor
|
 |
function ElapsedTimeInCycle: TFloatTime; |
Time in seconds since the sensor was activated and running, in this cycle, not counting any time while in pause state.
This is like ike ElapsedTime, but counting only the current cycle. When GetCycleInterval = 0, this is always 0. When GetCycleInterval <> 0, this is always >= 0 and < CycleInterval .
|
Properties
 |
property FdLoop: TSFBool read FFdLoop; |
|
 |
property FdPauseTime: TSFTime read FFdPauseTime; |
|
 |
property FdResumeTime: TSFTime read FFdResumeTime; |
|
 |
property EventElapsedTime: TSFTimeEvent read FEventElapsedTime; |
|
 |
property Loop: boolean read GetLoop write SetLoop; |
|
 |
property PauseTime: TFloatTime read GetPauseTime write SetPauseTime; |
|
 |
property ResumeTime: TFloatTime read GetResumeTime write SetResumeTime; |
|
 |
property StartTime: TFloatTime read GetStartTime write SetStartTime; |
|
 |
property StopTime: TFloatTime read GetStopTime write SetStopTime; |
|
Generated by PasDoc 0.15.0.
|