Table of Contents

Class AnimationController

Namespace
ValveResourceFormat.Renderer
Assembly
Renderer.dll

Manages skeletal animation playback and computes animated bone poses.

public class AnimationController

Inheritance

Inherited Members

Constructors

AnimationController(Skeleton, FlexController[])

public AnimationController(Skeleton skeleton, FlexController[] flexControllers)

Parameters

skeleton Skeleton
flexControllers FlexController[]

Properties

ActiveAnimation

public Animation? ActiveAnimation { get; }

Property Value

Animation?

AnimationFrame

public Frame? AnimationFrame { get; }

Property Value

Frame?

BindPose

The skeleton skinning bind pose.

public Matrix4x4[] BindPose { get; }

Property Value

Matrix4x4[]

Frame

public int Frame { get; set; }

Property Value

int

FrameCache

public AnimationFrameCache FrameCache { get; }

Property Value

AnimationFrameCache

FrametimeMultiplier

public float FrametimeMultiplier { get; set; }

Property Value

float

IsPaused

public bool IsPaused { get; set; }

Property Value

bool

Pose

The flattened worldspace transform of each bone, according to the current animation frame.

public Matrix4x4[] Pose { get; }

Property Value

Matrix4x4[]

Time

public float Time { get; }

Property Value

float

Methods

GetFrame()

public Frame? GetFrame()

Returns

Frame?

GetSkinningMatrices(Span<Matrix4x4>)

Get bone matrices in bindpose space. Bones that do not move from the original location will have an identity matrix. Thus there will be no transformation in the vertex shader.

public void GetSkinningMatrices(Span<Matrix4x4> modelBones)

Parameters

modelBones Span<Matrix4x4>

PauseLastFrame()

public void PauseLastFrame()

RegisterUpdateHandler(Action<Animation?, int>)

public void RegisterUpdateHandler(Action<Animation?, int> handler)

Parameters

handler Action<Animation?, int>

SetAnimation(Animation?)

public void SetAnimation(Animation? animation)

Parameters

animation Animation?

Update(float)

public bool Update(float timeStep)

Parameters

timeStep float

Returns

bool