Class Animator
Controls the animation playback of a 3D model.
Inherited Members
Namespace: Genesis.Graphics.Animation3D
Assembly: Genesis.dll
Syntax
public class Animator
Constructors
Animator()
Declaration
public Animator()
Animator(Animation)
Initializes a new instance of the Animator class with the specified animation.
Declaration
public Animator(Animation animation)
Parameters
Type | Name | Description |
---|---|---|
Animation | animation |
Properties
CurrentAnimation
Currently active animation.
Declaration
public Animation CurrentAnimation { get; set; }
Property Value
Type | Description |
---|---|
Animation |
CurrentTime
Current time in the animation.
Declaration
public float CurrentTime { get; set; }
Property Value
Type | Description |
---|---|
float |
DeltaTime
Time elapsed since last frame.
Declaration
public float DeltaTime { get; set; }
Property Value
Type | Description |
---|---|
float |
FinalBoneMatrices
List of final bone transformation matrices.
Declaration
public List<mat4> FinalBoneMatrices { get; set; }
Property Value
Type | Description |
---|---|
List<mat4> |
InterpolateFrames
Flag indicating whether to interpolate frames during animation playback.
Declaration
public bool InterpolateFrames { get; set; }
Property Value
Type | Description |
---|---|
bool |
Loop
Flag indicating whether to loop the animation.
Declaration
public bool Loop { get; set; }
Property Value
Type | Description |
---|---|
bool |
Play
Flag indicating whether the animation is playing.
Declaration
public bool Play { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
CalculateBoneTransform(AssimpNodeData, mat4)
Calculates bone transformations recursively based on the animation hierarchy.
Declaration
public void CalculateBoneTransform(AssimpNodeData node, mat4 parentTransform)
Parameters
Type | Name | Description |
---|---|---|
AssimpNodeData | node | |
mat4 | parentTransform |
LoadAnimation(Animation)
Loads a new animation.
Declaration
public void LoadAnimation(Animation animation)
Parameters
Type | Name | Description |
---|---|---|
Animation | animation |
UpdateAnimation(float)
Updates the animation based on the elapsed time since the last frame.
Declaration
public void UpdateAnimation(float dt)
Parameters
Type | Name | Description |
---|---|---|
float | dt |