Table of Contents

Class Bone

Namespace
LibGFX.Graphics.Animation3D
Assembly
LibGFX.dll

Represents a bone in a skeletal animation system.

public class Bone
Inheritance
Bone
Inherited Members

Constructors

Bone()

public Bone()

Bone(string, int, AnimationChannel)

public Bone(string name, int id, AnimationChannel animationChannel)

Parameters

name string
id int
animationChannel AnimationChannel

Properties

AnimationChannel

List of position keyframes for the bone.

public AnimationChannel AnimationChannel { get; set; }

Property Value

AnimationChannel

ID

ID of the bone.

public int ID { get; set; }

Property Value

int

LocalTransform

Local transformation matrix of the bone.

public Matrix4 LocalTransform { get; set; }

Property Value

Matrix4

Name

Name of the bone.

public string Name { get; set; }

Property Value

string

Methods

GetPositionIndex(float)

Gets the index of the position keyframe at the specified animation time.

public int GetPositionIndex(float animationTime)

Parameters

animationTime float

Returns

int

GetRotationIndex(float)

Gets the index of the rotation keyframe at the specified animation time.

public int GetRotationIndex(float animationTime)

Parameters

animationTime float

Returns

int

GetScaleFactor(float, float, float)

Calculates the interpolation factor between two keyframes.

public float GetScaleFactor(float lastTimeStamp, float nextTimeStamp, float animationTime)

Parameters

lastTimeStamp float
nextTimeStamp float
animationTime float

Returns

float

GetScaleIndex(float)

Gets the index of the scale keyframe at the specified animation time.

public int GetScaleIndex(float animationTime)

Parameters

animationTime float

Returns

int

InterpolatePosition(float)

public Matrix4 InterpolatePosition(float animationTime)

Parameters

animationTime float

Returns

Matrix4

InterpolateRotation(float)

public Matrix4 InterpolateRotation(float animationTime)

Parameters

animationTime float

Returns

Matrix4

InterpolateScaling(float)

public Matrix4 InterpolateScaling(float animationTime)

Parameters

animationTime float

Returns

Matrix4

Update(float, bool)

Updates the bone transformation based on the animation time.

public void Update(float animationTime, bool interpolate)

Parameters

animationTime float
interpolate bool