Class AnimationData
A base class for a IGorgonAnimation implementation.
Inherited Members
Namespace: Gorgon.Animation
Assembly: Gorgon.Animation.dll
Syntax
public class AnimationData : GorgonNamedObject, IGorgonAnimation, IGorgonNamedObject
Constructors
| Edit this page View SourceAnimationData(string, float, float)
Initializes a new instance of the AnimationData class.
Declaration
public AnimationData(string name, float fps, float length)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the track. |
float | fps | The frames per second for the animation. |
float | length | The length of the animation, in seconds. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
ArgumentEmptyException | Thrown when the |
Properties
| Edit this page View SourceColorTracks
Property to set or return the track used to update any values using a GorgonColor.
Declaration
public IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyGorgonColor>> ColorTracks { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyGorgonColor>> |
Fps
Property to return the frames per second for this animation.
Declaration
public float Fps { get; }
Property Value
Type | Description |
---|---|
float |
IsLooped
Property to set or return whether this animation should be looping or not.
Declaration
public bool IsLooped { get; set; }
Property Value
Type | Description |
---|---|
bool |
Length
Property to return the length of the animation (in seconds).
Declaration
public float Length { get; }
Property Value
Type | Description |
---|---|
float |
LoopCount
Property to set or return the number of times to loop an animation.
Declaration
public int LoopCount { get; set; }
Property Value
Type | Description |
---|---|
int |
QuaternionTracks
Property to return the track used to update any values using a Quaternion.
Declaration
public IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyQuaternion>> QuaternionTracks { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyQuaternion>> |
RectangleTracks
Property to set or return the track used to update any values using a SharpDX RectangleF
.
Declaration
public IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyRectangle>> RectangleTracks { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyRectangle>> |
SingleTracks
Property to set or return the tracks used to update any values using a single floating point value.
Declaration
public IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeySingle>> SingleTracks { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeySingle>> |
Speed
Property to set or return the speed of the animation.
Declaration
public float Speed { get; set; }
Property Value
Type | Description |
---|---|
float |
Remarks
Setting this value to a negative value will make the animation play backwards.
Texture2DTracks
Property to set or return the tracks used for updating a 2D texture on an object.
Declaration
public IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyTexture2D>> Texture2DTracks { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyTexture2D>> |
Vector2Tracks
Property to set or return the tracks used to update any values using a 2D vector.
Declaration
public IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector2>> Vector2Tracks { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector2>> |
Vector3Tracks
Property to set or return the track used to update any values using a 3D vector.
Declaration
public IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector3>> Vector3Tracks { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector3>> |
Vector4Tracks
Property to set or return the track used to update any values using a 4D vector.
Declaration
public IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector4>> Vector4Tracks { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, IGorgonAnimationTrack<GorgonKeyVector4>> |
Methods
| Edit this page View SourceGetMaxKeyFrameCount()
Function to retrieve the maximum number of key frames across all tracks.
Declaration
public int GetMaxKeyFrameCount()
Returns
Type | Description |
---|---|
int | The maximum number of key frames across all tracks. |