Class TTimeDependentFunctionality
Unit
Declaration
type TTimeDependentFunctionality = class(TNodeFunctionality)
Description
Functionality of all time-dependent nodes.
Hierarchy
- TObject
- TNodeFunctionality
- TTimeDependentFunctionality
Overview
Fields
PartialSend: TPartialSend; |
Methods
function CycleInterval: TFloatTime; |
|
function SetTime(const NewTime: TFloatTime; const TimeIncrease: TFloatTime; const ResetTime: boolean): boolean; |
Properties
property IsActive: boolean read FIsActive write SetIsActive; |
|
property IsPaused: boolean read FIsPaused write SetIsPaused; |
|
property ElapsedTime: TFloatTime read FElapsedTime write SetElapsedTime; |
|
property ElapsedTimeInCycle: TFloatTime read FElapsedTimeInCycle; |
Description
Fields
PartialSend: TPartialSend; |
|
Propagate this to all send events, to make animation fade-in/out. |
Methods
function CycleInterval: TFloatTime; |
|
Final duration (in seconds) of this animation. For a looping animation, this is the time it takes to make a single cycle. Should always be > 0. The final length, returned here, is
|
function SetTime(const NewTime: TFloatTime; const TimeIncrease: TFloatTime; const ResetTime: boolean): boolean; |
|
Call this when world time increases. This is the most important method of this class, that basically implements time-dependent nodes operations. NewTime and TimeIncrease are produced by TCastleSceneCore.SetTime and friends. When ResetTime = true, this means that "TimeIncrease value is unknown" (you must pass TimeIncrease = 0 in this case). This can happen only when were called by ResetTime. In other circumstances, TimeIncrease must be >= 0. (It's allowed to pass TimeIncrease = 0 and ResetTime = false, this doesn't advance the clock, but is a useful trick to force some update, see HandleChangeTimeStopStart in TCastleSceneCore.InternalChangedField implementation.) References: see X3D specification "Time" component, 8.2 ("concepts") for logic behind all those start/stop/pause/resumeTime, cycleInterval, loop properties. ReturnsIf some state of time-dependent node changed. |
Properties
property IsActive: boolean read FIsActive write SetIsActive; |
|
Is the sensor enabled and running (ignoring whether it is paused). For a precise specification of how this behaves, see the X3D TimeSensor.isActive specification at http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/time.html#TimeSensor Changing this automatically causes appropriate events to be generated. |
property IsPaused: boolean read FIsPaused write SetIsPaused; |
|
Is the sensor paused. For a precise specification of how this behaves, see the X3D TimeSensor.isPaused specification at http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/time.html#TimeSensor Changing this automatically causes appropriate events to be generated. |
property ElapsedTime: TFloatTime read FElapsedTime write SetElapsedTime; |
|
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 For a precise 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 Changing this automatically causes appropriate events to be generated. |
property ElapsedTimeInCycle: TFloatTime read FElapsedTimeInCycle; |
|
Time in seconds since the sensor was activated and running, in this cycle, not counting any time while in pause state. This is like ElapsedTime, but counting only the current cycle. When CycleInterval = 0, this is always 0. When CycleInterval <> 0, this is always >= 0 and < CycleInterval . |
Generated by PasDoc 0.16.0.