Class AnimationFrameCache
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly: ValveResourceFormat.dll
Caches animation frames to optimize frame retrieval and interpolation.
public class AnimationFrameCacheInheritance
object ← AnimationFrameCache
Constructors
AnimationFrameCache(Skeleton, FlexController[])
Initializes a new instance of the AnimationFrameCache class.
public AnimationFrameCache(Skeleton skeleton, FlexController[] flexControllers)Parameters
skeleton Skeleton
flexControllers FlexController[]
Properties
FlexControllers
Gets the flex controllers associated with this frame cache.
public FlexController[] FlexControllers { get; }Property Value
InterpolatedFrame
The output frame.
public Frame InterpolatedFrame { get; }Property Value
Skeleton
Gets the skeleton associated with this frame cache.
public Skeleton Skeleton { get; }Property Value
Methods
Clear()
Clears the cached frames (previous and next) and resets the frame cache. Should be used on animation change.
public void Clear()GetFrame(AnimationBase, int)
Get the animation frame at a given index.
public Frame GetFrame(AnimationBase anim, int frameIndex)Parameters
anim AnimationBase
frameIndex int
Returns
GetInterpolatedFrame(AnimationBase, float)
Get the animation frame at a time.
public Frame GetInterpolatedFrame(AnimationBase anim, float time)Parameters
anim AnimationBase
The animation to interpolate.
time float
The time to get the frame for.
Returns
PurgeCache()
Purges the frame cache, resetting both previous and next frames.
public void PurgeCache()
