Table of Contents

Class AnimationFrameCache

Namespace
ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly
ValveResourceFormat.dll

Caches animation frames to optimize frame retrieval and interpolation.

public class AnimationFrameCache

Inheritance

Inherited Members

Constructors

AnimationFrameCache(Skeleton, FlexController[])

Initializes a new instance of the ValveResourceFormat.ResourceTypes.ModelAnimation.AnimationFrameCache class.

public AnimationFrameCache(Skeleton skeleton, FlexController[] flexControllers)

Parameters

skeleton Skeleton
flexControllers FlexController[]

Properties

Skeleton

Gets the skeleton associated with this frame cache.

public Skeleton Skeleton { get; }

Property Value

Skeleton

Methods

Clear()

Clears interpolated frame bones and frame cache. Should be used on animation change.

public void Clear()

GetFrame(Animation, int)

Get the animation frame at a given index.

public Frame GetFrame(Animation anim, int frameIndex)

Parameters

anim Animation
frameIndex int

Returns

Frame

GetInterpolatedFrame(Animation, float)

Get the animation frame at a time.

public Frame GetInterpolatedFrame(Animation anim, float time)

Parameters

anim Animation

The animation to interpolate.

time float

The time to get the frame for.

Returns

Frame