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
namestringidintanimationChannelAnimationChannel
Properties
AnimationChannel
List of position keyframes for the bone.
public AnimationChannel AnimationChannel { get; set; }
Property Value
ID
ID of the bone.
public int ID { get; set; }
Property Value
LocalTransform
Local transformation matrix of the bone.
public Matrix4 LocalTransform { get; set; }
Property Value
Name
Name of the bone.
public string Name { get; set; }
Property Value
Methods
GetPositionIndex(float)
Gets the index of the position keyframe at the specified animation time.
public int GetPositionIndex(float animationTime)
Parameters
animationTimefloat
Returns
GetRotationIndex(float)
Gets the index of the rotation keyframe at the specified animation time.
public int GetRotationIndex(float animationTime)
Parameters
animationTimefloat
Returns
GetScaleFactor(float, float, float)
Calculates the interpolation factor between two keyframes.
public float GetScaleFactor(float lastTimeStamp, float nextTimeStamp, float animationTime)
Parameters
Returns
GetScaleIndex(float)
Gets the index of the scale keyframe at the specified animation time.
public int GetScaleIndex(float animationTime)
Parameters
animationTimefloat
Returns
InterpolatePosition(float)
public Matrix4 InterpolatePosition(float animationTime)
Parameters
animationTimefloat
Returns
InterpolateRotation(float)
public Matrix4 InterpolateRotation(float animationTime)
Parameters
animationTimefloat
Returns
InterpolateScaling(float)
public Matrix4 InterpolateScaling(float animationTime)
Parameters
animationTimefloat
Returns
Update(float, bool)
Updates the bone transformation based on the animation time.
public void Update(float animationTime, bool interpolate)