Interface IGorgonAnimation
The interface that defines an animation.
Inherited Members
Namespace: Gorgon.Animation
Assembly: Gorgon.Animation.dll
Syntax
public interface IGorgonAnimation : IGorgonNamedObject
Remarks
An animation is composed of multiple tracks that represent various properties on an object that can be changed over time. Each track is itself composed of multiple markers in time called key frames. These markers indicate what the value of a property should be at a given time.
To create an animation, a GorgonAnimationBuilder is used to build up the key frames for each track that is to be animated. Because of this, the animation tracks and key frames are immutable.
The available tracks on an animation are for common usage scenarios such as moving, scaling, rotating, etc... Please note that some animation controllers will not make use of some track types.
In order to play an animation, a GorgonAnimationController<T> must be used.
Properties
| Edit this page View SourceColorTracks
Property to return the track used to update any values using a GorgonColor.
Declaration
[JsonProperty("colortracks")]
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyGorgonColor>> ColorTracks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyGorgonColor>> |
See Also
| Edit this page View SourceFps
Property to return the frames per second for this animation.
Declaration
[JsonProperty("FPS")]
float Fps { get; }
Property Value
Type | Description |
---|---|
float |
See Also
| Edit this page View SourceIsLooped
Property to set or return whether this animation should be looping or not.
Declaration
bool IsLooped { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
| Edit this page View SourceLength
Property to return the length of the animation (in seconds).
Declaration
float Length { get; }
Property Value
Type | Description |
---|---|
float |
See Also
| Edit this page View SourceLoopCount
Property to set or return the number of times to loop an animation.
Declaration
int LoopCount { get; set; }
Property Value
Type | Description |
---|---|
int |
See Also
| Edit this page View SourceQuaternionTracks
Property to return the track used to update any values using a Quaternion.
Declaration
[JsonProperty("quaterniontracks")]
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyQuaternion>> QuaternionTracks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyQuaternion>> |
See Also
| Edit this page View SourceRectangleTracks
Property to return the track used to update any values using a SharpDX RectangleF
.
Declaration
[JsonProperty("recttracks")]
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyRectangle>> RectangleTracks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyRectangle>> |
See Also
| Edit this page View SourceSingleTracks
Property to return the tracks used to update any values using a single floating point value.
Declaration
[JsonProperty("singletracks")]
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeySingle>> SingleTracks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeySingle>> |
See Also
| Edit this page View SourceSpeed
Property to set or return the speed of the animation.
Declaration
[JsonIgnore]
float Speed { get; set; }
Property Value
Type | Description |
---|---|
float |
Remarks
Setting this value to a negative value will make the animation play backwards.
See Also
| Edit this page View SourceTexture2DTracks
Property to return the tracks used for updating a 2D texture on an object.
Declaration
[JsonProperty("textures")]
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyTexture2D>> Texture2DTracks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyTexture2D>> |
See Also
| Edit this page View SourceVector2Tracks
Property to return the tracks used to update any values using a 2D vector.
Declaration
[JsonProperty("vector2tracks")]
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector2>> Vector2Tracks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector2>> |
See Also
| Edit this page View SourceVector3Tracks
Property to return the track used to update any values using a 3D vector.
Declaration
[JsonProperty("vector3tracks")]
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector3>> Vector3Tracks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector3>> |
See Also
| Edit this page View SourceVector4Tracks
Property to return the track used to update any values using a 4D vector.
Declaration
[JsonProperty("vector4tracks")]
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector4>> Vector4Tracks { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector4>> |
See Also
Methods
| Edit this page View SourceGetMaxKeyFrameCount()
Function to retrieve the maximum number of key frames across all tracks.
Declaration
int GetMaxKeyFrameCount()
Returns
Type | Description |
---|---|
int | The maximum number of key frames across all tracks. |