Gorgon
Show / Hide Table of Contents

Class AnimationData

A base class for a IGorgonAnimation implementation.

Inheritance
object
GorgonNamedObject
AnimationData
Implements
IGorgonAnimation
IGorgonNamedObject
Inherited Members
GorgonNamedObject.GetHashCode()
GorgonNamedObject.ToString()
GorgonNamedObject.Name
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Animation
Assembly: Gorgon.Animation.dll
Syntax
public class AnimationData : GorgonNamedObject, IGorgonAnimation, IGorgonNamedObject

Constructors

| Edit this page View Source

AnimationData(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 name parameter is null.

ArgumentEmptyException

Thrown when the name parameter is empty.

Properties

| Edit this page View Source

ColorTracks

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>>
| Edit this page View Source

Fps

Property to return the frames per second for this animation.

Declaration
public float Fps { get; }
Property Value
Type Description
float
| Edit this page View Source

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
| Edit this page View Source

Length

Property to return the length of the animation (in seconds).

Declaration
public float Length { get; }
Property Value
Type Description
float
| Edit this page View Source

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
| Edit this page View Source

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>>
| Edit this page View Source

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>>
| Edit this page View Source

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>>
| Edit this page View Source

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.

| Edit this page View Source

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>>
| Edit this page View Source

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>>
| Edit this page View Source

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>>
| Edit this page View Source

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 Source

GetMaxKeyFrameCount()

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.

Implements

IGorgonAnimation
IGorgonNamedObject

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonAnimationExtensions.ToJson(IGorgonAnimation, bool)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author