Table of Contents

Class Animation3D

Namespace
LibGFX.Graphics.Animation3D
Assembly
LibGFX.dll

Represents an animation associated with a 3D model.

public class Animation3D
Inheritance
Animation3D
Inherited Members

Constructors

Animation3D()

Initializes a new instance of the Animation3D class. Used for deserialization purposes.

public Animation3D()

Animation3D(Scene, int)

Initializes a new instance of the Animation class without a model reference.

public Animation3D(Scene scene, int index)

Parameters

scene Scene
index int

Animation3D(Scene, int, Skeleton)

Initializes a new instance of the Animation class.

public Animation3D(Scene scene, int index, Skeleton skeleton)

Parameters

scene Scene
index int
skeleton Skeleton

Properties

BoneInfoMap

Mapping of bone names to bone information.

public Dictionary<string, BoneInfo> BoneInfoMap { get; set; }

Property Value

Dictionary<string, BoneInfo>

Bones

List of bones affected by the animation.

public List<Bone> Bones { get; set; }

Property Value

List<Bone>

Duration

Duration of the animation in ticks.

public float Duration { get; set; }

Property Value

float

Name

Name of the animation.

public string Name { get; set; }

Property Value

string

RootNode

Root node of the animation's scene hierarchy.

public SceneNodeData RootNode { get; set; }

Property Value

SceneNodeData

TicksPerSecond

Number of ticks per second for the animation.

public float TicksPerSecond { get; set; }

Property Value

float

Methods

AnimationLength()

Calculates the keyframe length of the animation based on the maximum number of position, rotation, and scaling keyframes among all bones.

public int AnimationLength()

Returns

int

The maximum number of keyframes (positions, rotations, or scalings) among all bones; if no bones are present, returns -1.

Remarks

This method iterates through all bones to determine the maximum keyframe length.

FindBone(string)

Finds a bone with the specified name.

public Bone FindBone(string name)

Parameters

name string

Returns

Bone

GetKeyFrameIndex(float)

Calculates the keyframe index based on the specified animation time.

public int GetKeyFrameIndex(float animationTime)

Parameters

animationTime float

Returns

int

LoadAnimationChannel(Animation)

public void LoadAnimationChannel(Animation animation)

Parameters

animation Animation

ReadBones(Skeleton)

Reads bones from the provided skeleton and associates them with the animation.

public void ReadBones(Skeleton skeleton)

Parameters

skeleton Skeleton