Class TweenKey
Value type containing information about the nearest keys for a time position.
Inherited Members
Namespace: Gorgon.Animation
Assembly: Gorgon.Animation.dll
Syntax
public static class TweenKey
Methods
| Edit this page View SourceGetNearestKeys<T>(IGorgonAnimationTrack<T>, float, float)
Function to return the nearest keys to the requested time.
Declaration
public static (T previous, T next, int prevKeyIndex, float timeDelta) GetNearestKeys<T>(IGorgonAnimationTrack<T> track, float requestedTime, float animationLength) where T : class, IGorgonKeyFrame
Parameters
Type | Name | Description |
---|---|---|
IGorgonAnimationTrack<T> | track | The track to evaluate. |
float | requestedTime | Track time requested. |
float | animationLength | The total animation time for the track that the keys belong to. |
Returns
Type | Description |
---|---|
(T previous, T next, int prevKeyIndex, float timeDelta) | A tuple containing the previous and next key that falls on or outside of the requested time, the index of the first key and the delta time between the start frame and the requested time. |
Type Parameters
Name | Description |
---|---|
T | The type of key in the track. Must implement IGorgonKeyFrame and be a reference type. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |