group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
anim_utils Namespace Reference

Classes

struct  JointRestPose
 Rest-pose local transform cached during skeleton building, reused as a fallback keyframe for joints without animation channels. More...
 

Functions

glm::mat4 ozzToGlm (const ozz::math::Float4x4 &m)
 Convert an ozz SIMD 4x4 matrix to a GLM column-major mat4.
 
glm::mat4 aiToGlm (const aiMatrix4x4 &m)
 Convert an Assimp row-major 4x4 matrix to GLM column-major.
 
bool buildJoint (const aiNode *node, const std::unordered_set< std::string > &boneNames, ozz::animation::offline::RawSkeleton::Joint &outJoint, std::unordered_map< std::string, JointRestPose > &restPoses)
 Recursively build a RawSkeleton joint tree from the Assimp node hierarchy.
 

Function Documentation

◆ aiToGlm()

glm::mat4 anim_utils::aiToGlm ( const aiMatrix4x4 &  m)

Convert an Assimp row-major 4x4 matrix to GLM column-major.

Parameters
mSource assimp matrix.
Returns
Equivalent GLM mat4.
Here is the caller graph for this function:

◆ buildJoint()

bool anim_utils::buildJoint ( const aiNode *  node,
const std::unordered_set< std::string > &  boneNames,
ozz::animation::offline::RawSkeleton::Joint &  outJoint,
std::unordered_map< std::string, JointRestPose > &  restPoses 
)

Recursively build a RawSkeleton joint tree from the Assimp node hierarchy.

Only includes nodes that are bones or ancestors of bones (prunes mesh nodes and other non-skeletal branches).

Parameters
nodeCurrent Assimp node to process.
boneNamesSet of bone names referenced by meshes.
outJointOutput joint to populate.
restPosesMap to store rest-pose transforms keyed by joint name.
Returns
True if this node or any descendant is a bone.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ozzToGlm()

glm::mat4 anim_utils::ozzToGlm ( const ozz::math::Float4x4 &  m)

Convert an ozz SIMD 4x4 matrix to a GLM column-major mat4.

Parameters
mSource ozz matrix.
Returns
Equivalent GLM mat4 (column-major).
Here is the caller graph for this function: