![]() |
AireEngine
A 3D Open-World Game Engine
|
Class for playing the animation. More...
#include <animator.h>

Public Member Functions | |
| Animator (Aire::MeshManager *meshManager, const std::string &animationPath, bool flippedUV) | |
| Animator (Animation *animation) | |
| ~Animator () | |
| Delete the animator and free data of the animation. | |
| glm::mat4 | InterpolateMatrices (const glm::mat4 &matrix1, const glm::mat4 &matrix2, float blendFactor) |
| void | UpdateAnimation (float dt) |
| void | PlayAnimation (Animation *pAnimation) |
| void | CalculateBoneTransform (const AssimpNodeData *node, glm::mat4 parentTransform, std::vector< glm::mat4 > &boneMatrices) |
| std::vector< glm::mat4 > | GetFinalBoneMatrices () |
| get the bone matrices | |
| void | render (ShaderProgram &shader, Camera &camera) |
| void | renderInstanced (ShaderProgram &shader, Camera &camera, glm::mat4 transform) |
Public Attributes | |
| bool | isStatic = true |
| Flag indicating whether the model is static. | |
| Model * | m_Model |
| The animated model. | |
| std::vector< Animation * > | animations |
| List of animations. | |
Class for playing the animation.
|
inline |
Constructor
| meshManager | The mesh manager |
| animationPath | The path of the animation |
| flippedUV | Flag to optionally flip the UVs of the mesh |

|
inline |
Constructor
| animation | The animation to run |
|
inline |
Calculate the bone transform
| node | The Assimp node |
| parentTransform | Transform of the parent node |
| boneMatrices | List to be filled with bone matrices |


|
inline |
get the bone matrices

|
inline |
Method to interpolate matrices. This is used when blending animations.
| matrix1 | The first matrix for blending |
| matrix2 | The second matrix for blending |
| blendFactor | The blend factor for the interpolation of the two matrices (value between 0 and 1) |

Play the animation
| pAnimation | animation |
|
inline |
Render the animation
| shader | Shader program to render the animation |
| camera | The camera associated with the player |

|
inline |
Render an instance of the animation
| shader | Shader program to use for rendering |
| camera | The camera associated with the player |
| transform | Transform for the model instance |


Update the animation informaiton accroding to the time
| dt | time Time delta to drive the animation |
