Class AnimationFrameCache
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly: ValveResourceFormat.dll
Caches animation frames to optimize frame retrieval and interpolation.
csharp
public class AnimationFrameCacheInheritance
Constructors
AnimationFrameCache(Skeleton, FlexController[])
Initializes a new instance of the class.
csharp
public AnimationFrameCache(Skeleton skeleton, FlexController[] flexControllers)Parameters
skeleton Skeleton
flexControllers FlexController[]
Properties
FlexControllers
Gets the flex controllers associated with this frame cache.
csharp
public FlexController[] FlexControllers { get; }Property Value
InterpolatedFrame
The output frame.
csharp
public Frame InterpolatedFrame { get; }Property Value
Skeleton
Gets the skeleton associated with this frame cache.
csharp
public Skeleton Skeleton { get; }Property Value
Methods
Clear()
Clears interpolated frame bones and frame cache. Should be used on animation change.
csharp
public void Clear()GetFrame(Animation, int)
Get the animation frame at a given index.
csharp
public Frame GetFrame(Animation anim, int frameIndex)Parameters
anim Animation
frameIndex int
Returns
GetInterpolatedFrame(Animation, float)
Get the animation frame at a time.
csharp
public Frame GetInterpolatedFrame(Animation anim, float time)Parameters
anim Animation
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.
csharp
public void PurgeCache()
