Gorgon
Show / Hide Table of Contents

Class GorgonPolySpriteAnimationController

A controller used to handle animations for a GorgonPolySprite.

Inheritance
object
GorgonAnimationController<GorgonPolySprite>
GorgonPolySpriteAnimationController
Inherited Members
GorgonAnimationController<GorgonPolySprite>.RegisteredTracks
GorgonAnimationController<GorgonPolySprite>.CurrentAnimation
GorgonAnimationController<GorgonPolySprite>.State
GorgonAnimationController<GorgonPolySprite>.Time
GorgonAnimationController<GorgonPolySprite>.RegisterTrack(GorgonTrackRegistration)
GorgonAnimationController<GorgonPolySprite>.Update(float?)
GorgonAnimationController<GorgonPolySprite>.Refresh()
GorgonAnimationController<GorgonPolySprite>.Reset()
GorgonAnimationController<GorgonPolySprite>.Play(GorgonPolySprite, IGorgonAnimation)
GorgonAnimationController<GorgonPolySprite>.Pause()
GorgonAnimationController<GorgonPolySprite>.Resume()
GorgonAnimationController<GorgonPolySprite>.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 GorgonPolySpriteAnimationController : GorgonAnimationController<GorgonPolySprite>
Remarks

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

A controller will update the GorgonPolySprite 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 GorgonPolySprite. 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(GorgonPolySpriteAnimationController.PositionTrack.TrackName);.

Constructors

| Edit this page View Source

GorgonPolySpriteAnimationController()

Initializes a new instance of the GorgonPolySpriteAnimationController class.

Declaration
public GorgonPolySpriteAnimationController()
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonPolySprite

Fields

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

TextureOffsetTrack

The track registration for the offset of the texture coordinates for the sprite.

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

TextureScaleTrack

The track registration for the scale of the texture coordinates for the sprite.

Declaration
public static readonly GorgonTrackRegistration TextureScaleTrack
Field Value
Type Description
GorgonTrackRegistration
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonPolySprite
| 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
GorgonPolySprite

Methods

| Edit this page View Source

OnColorUpdate(GorgonTrackRegistration, GorgonPolySprite, GorgonColor)

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

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

The track currently being processed.

GorgonPolySprite animObject

The object to update.

GorgonColor value

The value to apply.

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

OnQuaternionValueUpdate(GorgonTrackRegistration, GorgonPolySprite, Quaternion)

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

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

The track currently being processed.

GorgonPolySprite animObject

The object to update.

Quaternion value

The value to apply.

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

OnRectangleUpdate(GorgonTrackRegistration, GorgonPolySprite, RectangleF)

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

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

The track currently being processed.

GorgonPolySprite animObject

The object to update.

RectangleF value

The value to apply.

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

OnSingleValueUpdate(GorgonTrackRegistration, GorgonPolySprite, float)

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

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

The track currently being processed.

GorgonPolySprite animObject

The object to update.

float value

The value to apply.

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

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

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

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

The track currently being processed.

GorgonPolySprite 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<GorgonPolySprite>.OnTexture2DUpdate(GorgonTrackRegistration, GorgonPolySprite, GorgonTexture2DView, RectangleF, int)
See Also
GorgonAnimationController<T>
IGorgonAnimation
GorgonPolySprite
| Edit this page View Source

OnVector2ValueUpdate(GorgonTrackRegistration, GorgonPolySprite, Vector2)

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

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

The track currently being processed.

GorgonPolySprite animObject

The object to update.

Vector2 value

The value to apply.

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

OnVector3ValueUpdate(GorgonTrackRegistration, GorgonPolySprite, Vector3)

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

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

The track currently being processed.

GorgonPolySprite animObject

The object to update.

Vector3 value

The value to apply.

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

OnVector4ValueUpdate(GorgonTrackRegistration, GorgonPolySprite, Vector4)

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

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

The track currently being processed.

GorgonPolySprite animObject

The object to update.

Vector4 value

The value to apply.

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

Extension Methods

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

See Also

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