Gorgon
Show / Hide Table of Contents

Class GorgonTrackRegistration

Defines a registration for a track in the controller.

Inheritance
object
GorgonTrackRegistration
Implements
IEquatable<GorgonTrackRegistration>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Gorgon.Animation
Assembly: Gorgon.Animation.dll
Syntax
public class GorgonTrackRegistration : IEquatable<GorgonTrackRegistration>
Remarks

This provides metadata for an animation track and indicates which properties on an object can be manipulated while rendering the animation.

Applications defining their own animation controllers should define which tracks correspond to which properties by declaring a static field and registering that with the RegisterTrack(GorgonTrackRegistration) method in the static constructor of the custom controller.

Constructors

| Edit this page View Source

GorgonTrackRegistration(string, string, AnimationTrackKeyType, TrackInterpolationMode)

Initializes a new instance of the GorgonTrackRegistration struct.

Declaration
public GorgonTrackRegistration(string trackName, string description, AnimationTrackKeyType keyType, TrackInterpolationMode interpolationSupport = TrackInterpolationMode.Linear | TrackInterpolationMode.Spline)
Parameters
Type Name Description
string trackName

The name of the track.

string description

The friendly description of the track.

AnimationTrackKeyType keyType

The type of key frame data stored in the track.

TrackInterpolationMode interpolationSupport

[Optional] The type of interpolation supported by the track.

Exceptions
Type Condition
ArgumentNullException

Thrown when the trackName, or the keyType parameter is null.

ArgumentEmptyException

Thrown when the trackName parameter is empty.

Properties

| Edit this page View Source

Description

Property to return the friendly description for the track.

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

ID

Property to return the numeric ID of the track.

Declaration
public int ID { get; }
Property Value
Type Description
int
Remarks

This value is not guaranteed to be the same each time the application is run, thus storing this information in a file is not recommended.

| Edit this page View Source

KeyType

Property to return the type of key frame data in the track.

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

SupportedInterpolation

Property to return the type of interpolation supported by the track.

Declaration
public TrackInterpolationMode SupportedInterpolation { get; }
Property Value
Type Description
TrackInterpolationMode
Remarks

This value can contain multiple TrackInterpolationMode values OR'd together to indicate the different types of interpolation supported by the track.

See Also
TrackInterpolationMode
| Edit this page View Source

TrackName

Property to return the name of the track.

Declaration
public string TrackName { get; }
Property Value
Type Description
string
Remarks

This value is used in the GorgonAnimationBuilder to identify which track is being edited, and also in the GorgonAnimationController<T> to indicate which track is playing during the animation rendering.

See Also
GorgonAnimationBuilder
GorgonAnimationController<T>

Methods

| Edit this page View Source

Equals(GorgonTrackRegistration)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(GorgonTrackRegistration other)
Parameters
Type Name Description
GorgonTrackRegistration other

An object to compare with this object.

Returns
Type Description
bool true True true true (True in Visual Basic) if the current object is equal to the other parameter; otherwise, falseFalsefalsefalse (False in Visual Basic).
| Edit this page View Source

ToString()

Returns a string that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents this instance.

Overrides
object.ToString()

Implements

IEquatable<T>

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
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