Class T3DResourceAnimation
Unit
CastleResources
Declaration
type T3DResourceAnimation = class(TObject)
Description
Animation defined by T3DResource.
Hierarchy
- TObject
- T3DResourceAnimation
Overview
Methods
Properties
 |
property Duration: Single read FDuration; |
 |
property URL: string read FURL write FURL; |
 |
property AnimationName: string read FAnimationName write FAnimationName; |
 |
property TimeSensor: string read FAnimationName write FAnimationName; deprecated 'use AnimationName'; |
 |
property Name: string read FName; |
 |
property Required: boolean read FRequired; |
Description
Methods
 |
constructor Create(const AOwner: T3DResource; const AName: string; const ARequired: boolean = true); |
|
 |
function Defined: boolean; |
Was the animation state defined in resource.xml file. May be False only if Required was False , or before we actually read animation info from resource.xml file.
|
 |
function Scene(const Time: TFloatTime; const Loop: boolean): TCastleScene; |
Current Scene to render for given time.
Looping is automatically done here, if parameter Loop is True . When it is False , there is no looping, which means that when Time is < 0, we show the first frame, and when Time is > Duration, we show the last frame forever.
This looping (or not looping) is done regardless of whether the 3D model wants (or not) looping. For example, in case of castle-anim-frames files, we ignore their loop boolean attribute. In case of X3D, we ignore TimeSensor.loop field. In other words, any looping settings inside 3D model are ignored. You control looping fully by the Loop parameter to this method.
This returns the scene (TCastleScene) with state reflecting given time (TimeSensor forced to given time).
|
Properties
 |
property Duration: Single read FDuration; |
Duration of the animation. See engine tutorial about how resources animations duration is calculated. Always 0 if not Defined.
|
 |
property TimeSensor: string read FAnimationName write FAnimationName; deprecated 'use AnimationName'; |
Warning: this symbol is deprecated: use AnimationName |
 |
property Name: string read FName; |
|
 |
property Required: boolean read FRequired; |
|
Generated by PasDoc 0.15.0.
|