Gorgon
Show / Hide Table of Contents

Class GorgonSpriteAnimationController

A controller used to handle animations for a GorgonSprite.

Inheritance
object
GorgonAnimationController<GorgonSprite>
GorgonSpriteAnimationController
Inherited Members
GorgonAnimationController<GorgonSprite>.RegisteredTracks
GorgonAnimationController<GorgonSprite>.CurrentAnimation
GorgonAnimationController<GorgonSprite>.State
GorgonAnimationController<GorgonSprite>.Time
GorgonAnimationController<GorgonSprite>.RegisterTrack(GorgonTrackRegistration)
GorgonAnimationController<GorgonSprite>.Update(float?)
GorgonAnimationController<GorgonSprite>.Refresh()
GorgonAnimationController<GorgonSprite>.Reset()
GorgonAnimationController<GorgonSprite>.Play(GorgonSprite, IGorgonAnimation)
GorgonAnimationController<GorgonSprite>.Pause()
GorgonAnimationController<GorgonSprite>.Resume()
GorgonAnimationController<GorgonSprite>.Stop()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Animation
Assembly: Gorgon.Animation.Gorgon2D.dll
Syntax
public class GorgonSpriteAnimationController : GorgonAnimationController<GorgonSprite>
Remarks

This controller is an implementation of the GorgonAnimationController<T> type and is used apply animations to a GorgonSprite.

A controller will update the GorgonSprite properties over a certain time frame (or continuously if looped) using a IGorgonAnimation.

This controller will advance the time for an animation, and coordinate the changes from interpolation (if supported) between IGorgonKeyFrame items on a IGorgonAnimationTrack<T>. The values from the animation will then by applied to the object properties.

This controller type contains registrations for the tracks corresponding the many of the properties on a GorgonSprite. These registrations are available to the developer as static values on the class, and these should be used to identify the track name (e.g. Builder.EditVector2(GorgonSpriteAnimationController.PositionTrack.TrackName);.

Constructors

| Edit this page View Source

GorgonSpriteAnimationController()

Initializes a new instance of the GorgonSpriteAnimationController class.

Declaration
public GorgonSpriteAnimationController()
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite

Fields

| Edit this page View Source

AbsoluteAnchorTrack

The track registration for the anchor point, in absolute coordinates, of the sprite.

Declaration
public static readonly GorgonTrackRegistration AbsoluteAnchorTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

AnchorTrack

The track registration for the anchor point, in relative coordinates, of the sprite.

Declaration
public static readonly GorgonTrackRegistration AnchorTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

AngleTrack

The track registration for the angle of rotation for the sprite.

Declaration
public static readonly GorgonTrackRegistration AngleTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

BoundsTrack

The track registration for the bounds of the sprite.

Declaration
public static readonly GorgonTrackRegistration BoundsTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

ColorTrack

The track registration for the color on a sprite.

Declaration
public static readonly GorgonTrackRegistration ColorTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

DepthTrack

The track registration for the depth value of the sprite.

Declaration
public static readonly GorgonTrackRegistration DepthTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerLeft3DTrackName

The name of the lower left 3D position track.

Declaration
public const string LowerLeft3DTrackName = "LowerLeft3D"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerLeftColorTrack

The track registration for the lower left corner color on a sprite.

Declaration
public static readonly GorgonTrackRegistration LowerLeftColorTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerLeftColorTrackName

The name of the lower left color track.

Declaration
public const string LowerLeftColorTrackName = "LowerLeftColor"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerLeftPosition3DTrack

The track registration for the position, and depth of the lower left corner of the sprite.

Declaration
public static readonly GorgonTrackRegistration LowerLeftPosition3DTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerLeftPositionTrack

The track registration for the position of the lower left corner of the sprite.

Declaration
public static readonly GorgonTrackRegistration LowerLeftPositionTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerRight3DTrackName

The name of the lower right 3D position track.

Declaration
public const string LowerRight3DTrackName = "LowerRight3D"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerRightColorTrack

The track registration for the lower right corner color on a sprite.

Declaration
public static readonly GorgonTrackRegistration LowerRightColorTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerRightColorTrackName

The name of the lower right color track.

Declaration
public const string LowerRightColorTrackName = "LowerRightColor"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerRightPosition3DTrack

The track registration for the position, and depth of the lower right corner of the sprite.

Declaration
public static readonly GorgonTrackRegistration LowerRightPosition3DTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

LowerRightPositionTrack

The track registration for the position of the lower right corner of the sprite.

Declaration
public static readonly GorgonTrackRegistration LowerRightPositionTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OpacityTrack

The track registration for the opacity of the sprite.

Declaration
public static readonly GorgonTrackRegistration OpacityTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OpacityTrackName

The name of the opacity track.

Declaration
public const string OpacityTrackName = "Opacity"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

Position3DTrack

The track registration for the position, and depth of the sprite.

Declaration
public static readonly GorgonTrackRegistration Position3DTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

Position3DTrackName

The name of the 3D position track.

Declaration
public const string Position3DTrackName = "Position3D"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

PositionTrack

The track registration for the position of the sprite.

Declaration
public static readonly GorgonTrackRegistration PositionTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

ScaleTrack

The track registration for the scale, using relative values, of the sprite.

Declaration
public static readonly GorgonTrackRegistration ScaleTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

ScaledSizeTrack

The track registration for the scale, using absolute values, of the sprite.

Declaration
public static readonly GorgonTrackRegistration ScaledSizeTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

SizeTrack

The track registration for the size of the sprite.

Declaration
public static readonly GorgonTrackRegistration SizeTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

TextureArrayIndexTrack

The track registration for the texture array index for the sprite.

Declaration
public static readonly GorgonTrackRegistration TextureArrayIndexTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

TextureCoordinatesTrack

The track registration for the texture coordinates for the sprite.

Declaration
public static readonly GorgonTrackRegistration TextureCoordinatesTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

TextureTrack

The track registration for the texture, texture coordinates, and texture array index on a sprite.

Declaration
public static readonly GorgonTrackRegistration TextureTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperLeft3DTrackName

The name of the upper left 3D position track.

Declaration
public const string UpperLeft3DTrackName = "UpperLeft3D"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperLeftColorTrack

The track registration for the upper left corner color on a sprite.

Declaration
public static readonly GorgonTrackRegistration UpperLeftColorTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperLeftColorTrackName

The name of the upper left color track.

Declaration
public const string UpperLeftColorTrackName = "UpperLeftColor"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperLeftPosition3DTrack

The track registration for the position, and depth of the upper left corner of the sprite.

Declaration
public static readonly GorgonTrackRegistration UpperLeftPosition3DTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperLeftPositionTrack

The track registration for the position of the upper left corner of the sprite.

Declaration
public static readonly GorgonTrackRegistration UpperLeftPositionTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperRight3DTrackName

The name of the upper right 3D position track.

Declaration
public const string UpperRight3DTrackName = "UpperRight3D"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperRightColorTrack

The track registration for the upper right corner color on a sprite.

Declaration
public static readonly GorgonTrackRegistration UpperRightColorTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperRightColorTrackName

The name of the upper right color track.

Declaration
public const string UpperRightColorTrackName = "UpperRightColor"
Field Value
Type Description
string
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperRightPosition3DTrack

The track registration for the position, and depth of the upper right corner of the sprite.

Declaration
public static readonly GorgonTrackRegistration UpperRightPosition3DTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

UpperRightPositionTrack

The track registration for the position of the upper right corner of the sprite.

Declaration
public static readonly GorgonTrackRegistration UpperRightPositionTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite

Methods

| Edit this page View Source

OnColorUpdate(GorgonTrackRegistration, GorgonSprite, GorgonColor)

Function called when a GorgonColor value needs to be updated on the animated object.

Declaration
protected override void OnColorUpdate(GorgonTrackRegistration track, GorgonSprite animObject, GorgonColor value)
Parameters
Type Name Description
GorgonTrackRegistration track

The track currently being processed.

GorgonSprite animObject

The object to update.

GorgonColor value

The value to apply.

Overrides
GorgonAnimationController<GorgonSprite>.OnColorUpdate(GorgonTrackRegistration, GorgonSprite, GorgonColor)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OnQuaternionValueUpdate(GorgonTrackRegistration, GorgonSprite, Quaternion)

Function called when a Quaternion value needs to be updated on the animated object.

Declaration
protected override void OnQuaternionValueUpdate(GorgonTrackRegistration track, GorgonSprite animObject, Quaternion value)
Parameters
Type Name Description
GorgonTrackRegistration track

The track currently being processed.

GorgonSprite animObject

The object to update.

Quaternion value

The value to apply.

Overrides
GorgonAnimationController<GorgonSprite>.OnQuaternionValueUpdate(GorgonTrackRegistration, GorgonSprite, Quaternion)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OnRectangleUpdate(GorgonTrackRegistration, GorgonSprite, RectangleF)

Function called when a SharpDX RectangleF value needs to be updated on the animated object.

Declaration
protected override void OnRectangleUpdate(GorgonTrackRegistration track, GorgonSprite animObject, RectangleF value)
Parameters
Type Name Description
GorgonTrackRegistration track

The track currently being processed.

GorgonSprite animObject

The object to update.

RectangleF value

The value to apply.

Overrides
GorgonAnimationController<GorgonSprite>.OnRectangleUpdate(GorgonTrackRegistration, GorgonSprite, RectangleF)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OnSingleValueUpdate(GorgonTrackRegistration, GorgonSprite, float)

Function called when a single floating point value needs to be updated on the animated object.

Declaration
protected override void OnSingleValueUpdate(GorgonTrackRegistration track, GorgonSprite animObject, float value)
Parameters
Type Name Description
GorgonTrackRegistration track

The track currently being processed.

GorgonSprite animObject

The object to update.

float value

The value to apply.

Overrides
GorgonAnimationController<GorgonSprite>.OnSingleValueUpdate(GorgonTrackRegistration, GorgonSprite, float)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OnTexture2DUpdate(GorgonTrackRegistration, GorgonSprite, GorgonTexture2DView, RectangleF, int)

Function called when a texture needs to be updated on the object.

Declaration
protected override void OnTexture2DUpdate(GorgonTrackRegistration track, GorgonSprite animObject, GorgonTexture2DView texture, RectangleF textureCoordinates, int textureArrayIndex)
Parameters
Type Name Description
GorgonTrackRegistration track

The track currently being processed.

GorgonSprite animObject

The object to update.

GorgonTexture2DView texture

The texture to switch to.

RectangleF textureCoordinates

The new texture coordinates to apply.

int textureArrayIndex

The texture array index.

Overrides
GorgonAnimationController<GorgonSprite>.OnTexture2DUpdate(GorgonTrackRegistration, GorgonSprite, GorgonTexture2DView, RectangleF, int)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OnVector2ValueUpdate(GorgonTrackRegistration, GorgonSprite, Vector2)

Function called when a 2D vector value needs to be updated on the animated object.

Declaration
protected override void OnVector2ValueUpdate(GorgonTrackRegistration track, GorgonSprite animObject, Vector2 value)
Parameters
Type Name Description
GorgonTrackRegistration track

The track currently being processed.

GorgonSprite animObject

The object to update.

Vector2 value

The value to apply.

Overrides
GorgonAnimationController<GorgonSprite>.OnVector2ValueUpdate(GorgonTrackRegistration, GorgonSprite, Vector2)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OnVector3ValueUpdate(GorgonTrackRegistration, GorgonSprite, Vector3)

Function called when a 3D vector value needs to be updated on the animated object.

Declaration
protected override void OnVector3ValueUpdate(GorgonTrackRegistration track, GorgonSprite animObject, Vector3 value)
Parameters
Type Name Description
GorgonTrackRegistration track

The track currently being processed.

GorgonSprite animObject

The object to update.

Vector3 value

The value to apply.

Overrides
GorgonAnimationController<GorgonSprite>.OnVector3ValueUpdate(GorgonTrackRegistration, GorgonSprite, Vector3)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
| Edit this page View Source

OnVector4ValueUpdate(GorgonTrackRegistration, GorgonSprite, Vector4)

Function called when a 4D vector value needs to be updated on the animated object.

Declaration
protected override void OnVector4ValueUpdate(GorgonTrackRegistration track, GorgonSprite animObject, Vector4 value)
Parameters
Type Name Description
GorgonTrackRegistration track

The track currently being processed.

GorgonSprite animObject

The object to update.

Vector4 value

The value to apply.

Overrides
GorgonAnimationController<GorgonSprite>.OnVector4ValueUpdate(GorgonTrackRegistration, GorgonSprite, Vector4)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)

See Also

GorgonAnimationController<T>
IGorgonAnimation
GorgonSprite
  • 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