Gorgon
Show / Hide Table of Contents

Class TweenKey

Value type containing information about the nearest keys for a time position.

Inheritance
object
TweenKey
Inherited Members
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.dll
Syntax
public static class TweenKey

Methods

| Edit this page View Source

GetNearestKeys<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 track parameter is null.

  • 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