121 void updateNodeList(vector<FlattenedNode>& nodeList,
int& nodeIdx,
const map<string, Node*>& nodes,
AnimationState* animationState =
nullptr);
177 void setAnimation(
const string&
id,
float speed = 1.0f);
AnimationProcessingTarget
Representation of a 3d model.
map< string, Node * > & getSubNodes()
Returns object's sub nodes.
Object3D animation class.
void setAnimation(const string &id, float speed=1.0f)
Sets up a base animation to play.
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.
map< string, AnimationState * > overlayAnimationsById
void updateNodeList(vector< FlattenedNode > &nodeList, int &nodeIdx, const map< string, Node * > &nodes, AnimationState *animationState=nullptr)
Update node list.
void unsetNodeTransformationsMatrix(const string &id)
Unset transformation matrix for given node.
map< string, Matrix4x4 * > * getSkinningNodesMatrices(Node *node)
Get skinning nodes matrices.
vector< AnimationState > baseAnimations
void addOverlayAnimation(const string &id)
Overlays a animation above the base animation.
Engine::AnimationProcessingTarget animationProcessingTarget
float getOverlayAnimationTime(const string &id)
Returns current overlay animation time.
void removeOverlayAnimation(const string &id)
Removes a overlay animation.
bool hasOverlayAnimation(const string &id)
Returns if there is currently running a overlay animation with given id.
vector< vector< NodeSkinningJoint > > skinningNodesNodeSkinningJoints
void updateNodeList(vector< FlattenedNode > &nodeList)
Update node list.
map< string, AnimationState * > overlayAnimationsByJointId
void updateSkinningTransformationsMatrices()
Update skinning transformations matrices.
const string getAnimation()
void setNodeTransformationsMatrix(const string &id, const Matrix4x4 &matrix)
Set transformation matrix for given node.
virtual ~Object3DAnimation()
Destructor.
const Matrix4x4 getNodeTransformationsMatrix(const string &id)
Returns transformation matrix for given node.
void computeTransformationsMatrices(vector< FlattenedNode > &nodeList, const Matrix4x4 parentTransformationsMatrix, AnimationState *animationState)
Calculates all nodes transformation matrices.
void setAnimationSpeed(float speed)
Set up animation speed.
void removeOverlayAnimations()
Removes all overlay animations.
vector< Node * > skinningNodes
void removeOverlayAnimationsFinished()
Removes all finished overlay animations.
Object3DAnimation(Model *model, Engine::AnimationProcessingTarget animationProcessingTarget)
Public constructor.
int32_t determineSkinnedNodeCount(const map< string, Node * > &nodes)
Determine skinned node count.
float getAnimationTime()
Returns current base animation time.
map< string, Matrix4x4 * > overriddenTransformationsMatrices
vector< vector< FlattenedNode > > nodeLists
void updateNodeLists()
Update node lists.
vector< map< string, Matrix4x4 * > > transformationsMatrices
int32_t determineSkinnedNodes(const map< string, Node * > &nodes, vector< Node * > &skinningNodes, int32_t idx)
Determine skinned nodes.
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.
vector< map< string, Matrix4x4 * > > skinningNodesMatrices
Object 3d node specifically for rendering.
const Matrix4x4 * nodeTransformationsMatrix
const Matrix4x4 * parentTransformationsMatrix
Matrix4x4 * transformationsMatrix
Matrix4x4 * nodeOverriddenTransformationsMatrix
AnimationState * nodeAnimationState
const Animation * nodeAnimation
const Matrix4x4 * nodeTransformationsMatrix
Matrix4x4 * skinningNodeTransformationsMatrix