Table of Contents

Class Animator

Namespace
LibGFX.Graphics.Animation3D
Assembly
LibGFX.dll

Controls the animation playback of a 3D model.

public class Animator
Inheritance
Animator
Inherited Members

Constructors

Animator()

Initializes a new instance of the Animator class.

public Animator()

Animator(Animation3D)

Initializes a new instance of the Animator class with the specified animation.

public Animator(Animation3D animation)

Parameters

animation Animation3D

Properties

AnimationCallbacks

List of animation callbacks to be triggered during playback.

public List<IAnimationCallback> AnimationCallbacks { get; set; }

Property Value

List<IAnimationCallback>

CurrentAnimation

Currently active animation.

public Animation3D CurrentAnimation { get; set; }

Property Value

Animation3D

CurrentTime

Current time in the animation.

public float CurrentTime { get; set; }

Property Value

float

DeltaTime

Time elapsed since last frame.

public float DeltaTime { get; set; }

Property Value

float

FinalBoneMatrices

List of final bone transformation matrices.

public List<Matrix4> FinalBoneMatrices { get; set; }

Property Value

List<Matrix4>

InterpolateFrames

Flag indicating whether to interpolate frames during animation playback.

public bool InterpolateFrames { get; set; }

Property Value

bool

Loop

Flag indicating whether to loop the animation.

public bool Loop { get; set; }

Property Value

bool

Play

Flag indicating whether the animation is playing.

public bool Play { get; set; }

Property Value

bool

Methods

CalculateBoneTransform(SceneNodeData, Matrix4)

Calculates bone transformations recursively based on the animation hierarchy.

public void CalculateBoneTransform(SceneNodeData node, Matrix4 parentTransform)

Parameters

node SceneNodeData
parentTransform Matrix4

LoadAnimation(Animation3D)

Loads a new animation.

public void LoadAnimation(Animation3D animation)

Parameters

animation Animation3D

UpdateAnimation(float)

Updates the animation based on the elapsed time since the last frame.

public void UpdateAnimation(float dt)

Parameters

dt float