Class GorgonTrackRegistration
Defines a registration for a track in the controller.
Implements
Inherited Members
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 SourceGorgonTrackRegistration(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 |
ArgumentEmptyException | Thrown when the |
Properties
| Edit this page View SourceDescription
Property to return the friendly description for the track.
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
string |
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.
KeyType
Property to return the type of key frame data in the track.
Declaration
public AnimationTrackKeyType KeyType { get; }
Property Value
Type | Description |
---|---|
AnimationTrackKeyType |
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
| Edit this page View SourceTrackName
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
Methods
| Edit this page View SourceEquals(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).
|
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents this instance. |