Gorgon
Show / Hide Table of Contents

Interface IGorgonAnimationTrack<T>

A track for a IGorgonAnimation.

Inherited Members
IGorgonNamedObject.Name
Namespace: Gorgon.Animation
Assembly: Gorgon.Animation.dll
Syntax
public interface IGorgonAnimationTrack<out T> : IGorgonNamedObject where T : IGorgonKeyFrame
Type Parameters
Name Description
T

The type of key frame, must implement IGorgonKeyFrame

Remarks

Tracks contain a list of values in time, called key frames. These key frames tell the animation what the value for a property should be at the specified time.

Properties

| Edit this page View Source

InterpolationMode

Property to set or return the interpolation mode.

Declaration
TrackInterpolationMode InterpolationMode { get; set; }
Property Value
Type Description
TrackInterpolationMode
Remarks

If the value assigned is not supported by the track (use the SupportsInterpolation property), then the original value is kept.

See Also
IGorgonKeyFrame
| Edit this page View Source

IsEnabled

Property to set or return whether this track is enabled during animation.

Declaration
[JsonProperty("isEnabled")]
bool IsEnabled { get; set; }
Property Value
Type Description
bool
See Also
IGorgonKeyFrame
| Edit this page View Source

KeyFrameDataType

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

Declaration
[JsonIgnore]
AnimationTrackKeyType KeyFrameDataType { get; }
Property Value
Type Description
AnimationTrackKeyType
See Also
IGorgonKeyFrame
| Edit this page View Source

KeyFrames

Property to return the key frames for the track.

Declaration
[JsonProperty("keyframes")]
IReadOnlyList<out T> KeyFrames { get; }
Property Value
Type Description
IReadOnlyList<T>
See Also
IGorgonKeyFrame
| Edit this page View Source

SplineController

Property to return the spline controller (if applicable) for the track.

Declaration
[JsonIgnore]
IGorgonSplineCalculation SplineController { get; }
Property Value
Type Description
IGorgonSplineCalculation
See Also
IGorgonKeyFrame
| Edit this page View Source

SupportsInterpolation

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

Declaration
[JsonIgnore]
TrackInterpolationMode SupportsInterpolation { get; }
Property Value
Type Description
TrackInterpolationMode
See Also
IGorgonKeyFrame

Methods

| Edit this page View Source

GetValueAtTime(float)

Function to retrieve the value at the specified time index.

Declaration
T GetValueAtTime(float timeIndex)
Parameters
Type Name Description
float timeIndex

The time index, in seconds, within the track to retrieve the value from.

Returns
Type Description
T

The value at the specified time index.

Remarks

The value returned by this method may or may not be interpolated based on the value in InterpolationMode.

See Also
IGorgonKeyFrame

Extension Methods

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

See Also

IGorgonKeyFrame
  • 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