Object3D animation class.
More...
#include <tdme/engine/subsystems/rendering/Object3DAnimation.h>
|
| Object3DAnimation (Model *model, Engine::AnimationProcessingTarget animationProcessingTarget) |
| Public constructor. More...
|
|
virtual | ~Object3DAnimation () |
| Destructor. More...
|
|
void | createTransformationsMatrices (map< string, Matrix4x4 * > &matrices, vector< FlattenedNode > &nodeList, const map< string, Node * > &nodes, Matrix4x4 *parentTransformationsMatrix=nullptr, AnimationState *animationState=nullptr) |
| Creates all nodes transformation matrices. More...
|
|
void | updateNodeList (vector< FlattenedNode > &nodeList, int &nodeIdx, const map< string, Node * > &nodes, AnimationState *animationState=nullptr) |
| Update node list. More...
|
|
void | updateNodeList (vector< FlattenedNode > &nodeList) |
| Update node list. More...
|
|
void | updateNodeLists () |
| Update node lists. More...
|
|
void | computeTransformationsMatrices (vector< FlattenedNode > &nodeList, const Matrix4x4 parentTransformationsMatrix, AnimationState *animationState) |
| Calculates all nodes transformation matrices. More...
|
|
void | computeTransformations (vector< FlattenedNode > &nodeList, const Matrix4x4 &instanceTransformationsMatrix, AnimationState &baseAnimation, int contextIdx, int64_t lastFrameAtTime, int64_t currentFrameAtTime) |
| Compute transformations for given animation state into given transformations matrices. More...
|
|
void | updateSkinningTransformationsMatrices () |
| Update skinning transformations matrices. More...
|
|
map< string, Matrix4x4 * > * | getSkinningNodesMatrices (Node *node) |
| Get skinning nodes matrices. More...
|
|
Object3D animation class.
- Author
- Andreas Drewke
Definition at line 33 of file Object3DAnimation.h.
◆ Object3DAnimation()
Public constructor.
- Parameters
-
model | model |
animationProcessingTarget | animation processing target |
Definition at line 41 of file Object3DAnimation.cpp.
◆ ~Object3DAnimation()
◆ addOverlayAnimation()
void addOverlayAnimation |
( |
const string & |
id | ) |
|
◆ computeTransformations() [1/2]
void computeTransformations |
( |
int |
contextIdx, |
|
|
const Matrix4x4 & |
objectTransformationsMatrix, |
|
|
int64_t |
lastFrameAtTime, |
|
|
int64_t |
currentFrameAtTime |
|
) |
| |
Pre render step, computes transformations.
- Parameters
-
contextIdx | context index |
objectTransformationsMatrix | object transformations matrix |
lastFrameAtTime | time of last animation computation |
currentFrameAtTime | time of current animation computation |
Definition at line 464 of file Object3DAnimation.cpp.
◆ computeTransformations() [2/2]
void computeTransformations |
( |
vector< FlattenedNode > & |
nodeList, |
|
|
const Matrix4x4 & |
instanceTransformationsMatrix, |
|
|
AnimationState & |
baseAnimation, |
|
|
int |
contextIdx, |
|
|
int64_t |
lastFrameAtTime, |
|
|
int64_t |
currentFrameAtTime |
|
) |
| |
|
protected |
Compute transformations for given animation state into given transformations matrices.
- Parameters
-
nodeList | flattened node list |
instanceTransformationsMatrix | object transformations matrix |
baseAnimation | base animation |
contextIdx | context index |
lastFrameAtTime | time of last animation computation |
currentFrameAtTime | time of current animation computation |
Definition at line 424 of file Object3DAnimation.cpp.
◆ computeTransformationsMatrices()
Calculates all nodes transformation matrices.
- Parameters
-
nodeList | flattened node list |
parentTransformationsMatrix | parent transformations matrix |
animationState | animation state |
Definition at line 356 of file Object3DAnimation.cpp.
◆ createTransformationsMatrices()
Creates all nodes transformation matrices.
- Parameters
-
matrices | matrices |
nodeList | flattened node list |
nodes | nodes |
parentTransformationsMatrix | parent transformations matrix |
animationState | animation state |
Definition at line 291 of file Object3DAnimation.cpp.
◆ determineSkinnedNodeCount() [1/2]
int32_t determineSkinnedNodeCount |
( |
const map< string, Node * > & |
nodes | ) |
|
|
private |
◆ determineSkinnedNodeCount() [2/2]
int32_t determineSkinnedNodeCount |
( |
const map< string, Node * > & |
nodes, |
|
|
int32_t |
count |
|
) |
| |
|
private |
Determine skinned node count.
- Parameters
-
nodes | nodes |
count | current count |
Definition at line 513 of file Object3DAnimation.cpp.
◆ determineSkinnedNodes()
int32_t determineSkinnedNodes |
( |
const map< string, Node * > & |
nodes, |
|
|
vector< Node * > & |
skinningNodes, |
|
|
int32_t |
idx |
|
) |
| |
|
private |
Determine skinned nodes.
- Parameters
-
nodes | nodes |
skinningNodes | skinning nodes |
idx | idx |
Definition at line 530 of file Object3DAnimation.cpp.
◆ getAnimation()
const string getAnimation |
( |
| ) |
|
◆ getAnimationTime()
float getAnimationTime |
( |
| ) |
|
◆ getNodeTransformationsMatrix()
const Matrix4x4 getNodeTransformationsMatrix |
( |
const string & |
id | ) |
|
Returns transformation matrix for given node.
- Parameters
-
- Returns
- transformation matrix or identity matrix if not found
Definition at line 253 of file Object3DAnimation.cpp.
◆ getOverlayAnimationTime()
float getOverlayAnimationTime |
( |
const string & |
id | ) |
|
Returns current overlay animation time.
- Parameters
-
- Returns
- 0.0 <= time <= 1.0
Definition at line 243 of file Object3DAnimation.cpp.
◆ getSkinningNodesMatrices()
map< string, Matrix4x4 * > * getSkinningNodesMatrices |
( |
Node * |
node | ) |
|
|
protected |
◆ hasOverlayAnimation()
bool hasOverlayAnimation |
( |
const string & |
id | ) |
|
Returns if there is currently running a overlay animation with given id.
- Parameters
-
- Returns
- animation is running
Definition at line 238 of file Object3DAnimation.cpp.
◆ removeOverlayAnimation()
void removeOverlayAnimation |
( |
const string & |
id | ) |
|
◆ removeOverlayAnimations()
void removeOverlayAnimations |
( |
| ) |
|
◆ removeOverlayAnimationsFinished()
void removeOverlayAnimationsFinished |
( |
| ) |
|
◆ setAnimation()
void setAnimation |
( |
const string & |
id, |
|
|
float |
speed = 1.0f |
|
) |
| |
Sets up a base animation to play.
- Parameters
-
id | id |
speed | speed whereas 1.0 is default speed |
Definition at line 111 of file Object3DAnimation.cpp.
◆ setAnimationSpeed()
void setAnimationSpeed |
( |
float |
speed | ) |
|
Set up animation speed.
- Parameters
-
speed | speed whereas 1.0 is default speed |
Definition at line 152 of file Object3DAnimation.cpp.
◆ setNodeTransformationsMatrix()
void setNodeTransformationsMatrix |
( |
const string & |
id, |
|
|
const Matrix4x4 & |
matrix |
|
) |
| |
Set transformation matrix for given node.
- Parameters
-
id | node id |
matrix | transformation matrix |
Definition at line 268 of file Object3DAnimation.cpp.
◆ unsetNodeTransformationsMatrix()
void unsetNodeTransformationsMatrix |
( |
const string & |
id | ) |
|
◆ updateNodeList() [1/2]
◆ updateNodeList() [2/2]
Update node list.
- Parameters
-
nodeList | flattened node list |
nodeIdx | node index |
nodes | nodes |
animationState | animation state |
Definition at line 328 of file Object3DAnimation.cpp.
◆ updateNodeLists()
◆ updateSkinningTransformationsMatrices()
void updateSkinningTransformationsMatrices |
( |
| ) |
|
|
inlineprotected |
◆ tdme::engine::subsystems::rendering::ModelUtilitiesInternal
◆ tdme::engine::subsystems::rendering::Object3DBase
◆ tdme::engine::subsystems::rendering::Object3DInternal
◆ tdme::engine::subsystems::rendering::Object3DNode
◆ animationProcessingTarget
◆ baseAnimationIdx
◆ baseAnimations
◆ hasAnimations
◆ hasSkinning
◆ model
◆ nodeLists
◆ overlayAnimationsById
◆ overlayAnimationsByJointId
◆ overriddenTransformationsMatrices
map<string, Matrix4x4*> overriddenTransformationsMatrices |
|
protected |
◆ skinningNodes
vector<Node*> skinningNodes |
|
protected |
◆ skinningNodesMatrices
vector<map<string, Matrix4x4*> > skinningNodesMatrices |
|
protected |
◆ skinningNodesNodeSkinningJoints
◆ transformationsMatrices
vector<map<string, Matrix4x4*> > transformationsMatrices |
|
protected |
The documentation for this class was generated from the following files:
- /home/andreas/Development/drewke.net/tdme2/src/tdme/engine/subsystems/rendering/Object3DAnimation.h
- /home/andreas/Development/drewke.net/tdme2/src/tdme/engine/subsystems/rendering/Object3DAnimation.cpp