10#include <glm/gtc/quaternion.hpp>
15#include <unordered_map>
27 float weights[4] = {0.0f, 0.0f, 0.0f, 0.0f};
69 const glm::quat& orientationFix = glm::quat(1.0f, 0.0f, 0.0f, 0.0f),
70 bool flipNormals = false,
71 bool flipUVs = false);
74 [[nodiscard]]
bool isLoaded() const noexcept;
77 [[nodiscard]]
int numJoints() const noexcept;
80 [[nodiscard]] const
ozz::animation::Skeleton*
skeleton() const noexcept;
89 [[nodiscard]] const
std::unordered_map<
std::
string,
int>&
jointMap() const noexcept;
Assimp ↔ ozz ↔ GLM conversion helpers shared by the rig and animation library loaders.
Bind-pose vertex layout used by the CPU skinning pipeline.
const ozz::animation::Skeleton * skeleton() const noexcept
ozz skeleton (owning). Null if not loaded.
Definition CharacterRig.cpp:65
const std::unordered_map< std::string, anim_utils::JointRestPose > & restPoses() const noexcept
Rest-pose local transforms keyed by joint name (used by the animation library to build single-key tra...
Definition CharacterRig.cpp:85
bool loadFromFBX(const std::string &path, const glm::quat &orientationFix=glm::quat(1.0f, 0.0f, 0.0f, 0.0f), bool flipNormals=false, bool flipUVs=false)
Load rig from an FBX/GLB file.
Definition CharacterRig.cpp:114
void verticalBounds(float &outMinY, float &outMaxY) const
Compute the vertical (Y) extent of the bind-pose mesh.
Definition CharacterRig.cpp:90
CharacterRig(const CharacterRig &)=delete
const std::vector< RigMeshData > & meshes() const noexcept
Per-mesh bind-pose + weight data.
Definition CharacterRig.cpp:75
CharacterRig()
Definition CharacterRig.cpp:50
CharacterRig & operator=(const CharacterRig &)=delete
CharacterRig(CharacterRig &&) noexcept
int numJoints() const noexcept
Number of skeleton joints. 0 if not loaded.
Definition CharacterRig.cpp:60
const std::vector< glm::mat4 > & inverseBindMatrices() const noexcept
Inverse bind matrices, one per joint (identity for structural joints).
Definition CharacterRig.cpp:70
bool isLoaded() const noexcept
True after a successful loadFromFBX().
Definition CharacterRig.cpp:55
const std::unordered_map< std::string, int > & jointMap() const noexcept
Joint name → runtime index map.
Definition CharacterRig.cpp:80
std::unique_ptr< Impl > impl_
Definition CharacterRig.hpp:105
Definition FbxImportUtils.cpp:9
Definition AnimationLibrary.hpp:11
Definition AnimationLibrary.hpp:11
Definition AudioRuntime.hpp:365
Definition CharacterRig.cpp:40
Per-mesh bind-pose + skin weight data. One entry per skinned mesh in the rig FBX.
Definition CharacterRig.hpp:32
std::vector< uint32_t > indices
Triangle indices.
Definition CharacterRig.hpp:35
std::vector< ModelVertex > baseVertices
Bind-pose vertices (never mutated).
Definition CharacterRig.hpp:33
uint32_t materialIndex
Source aiMesh material index — used to bind the right per-mesh texture.
Definition CharacterRig.hpp:36
std::vector< SkinWeight > skinWeights
Parallel to baseVertices.
Definition CharacterRig.hpp:34
Per-vertex skin data — up to 4 bone influences, with parallel weights.
Definition CharacterRig.hpp:25
int boneIndices[4]
Definition CharacterRig.hpp:26
float weights[4]
Definition CharacterRig.hpp:27