12#include <unordered_map>
24 float weights[4] = {0.0f, 0.0f, 0.0f, 0.0f};
57 [[nodiscard]]
bool isLoaded() const noexcept;
60 [[nodiscard]]
int numJoints() const noexcept;
63 [[nodiscard]] const
ozz::animation::Skeleton*
skeleton() const noexcept;
72 [[nodiscard]] const std::unordered_map<std::
string,
int>&
jointMap() const noexcept;
77 [[nodiscard]] const std::unordered_map<std::
string,
anim_utils::JointRestPose>&
restPoses() const noexcept;
96 std::unique_ptr<
Impl> impl_;
Assimp ↔ ozz ↔ GLM conversion helpers shared by the rig and animation library loaders.
Assimp-based model loading and CPU-side mesh/texture data types.
Shared skinned rig — skeleton + bind-pose meshes + joint map.
Definition CharacterRig.hpp:42
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
void verticalBounds(float &outMinY, float &outMaxY) const
Compute the vertical (Y) extent of the bind-pose mesh.
Definition CharacterRig.cpp:95
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
bool loadFromFBX(const std::string &path)
Load rig from an FBX file.
Definition CharacterRig.cpp:114
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 LoadedModel & templateLoadedModel() const noexcept
A LoadedModel built from the rig's bind-pose meshes, suitable for cloning into a renderer model insta...
Definition CharacterRig.cpp:90
const std::unordered_map< std::string, int > & jointMap() const noexcept
Joint name → runtime index map.
Definition CharacterRig.cpp:80
Definition FbxImportUtils.cpp:9
Definition AnimationLibrary.hpp:11
Definition AnimationLibrary.hpp:11
Definition CharacterRig.cpp:40
Everything returned by loadModel().
Definition ModelLoader.hpp:76
PBR material scalar parameters extracted from Assimp/glTF.
Definition ModelLoader.hpp:41
Per-mesh bind-pose + skin weight data. One entry per skinned mesh in the rig FBX.
Definition CharacterRig.hpp:29
MaterialData material
Default PBR scalars (grey matte).
Definition CharacterRig.hpp:33
std::vector< uint32_t > indices
Triangle indices.
Definition CharacterRig.hpp:32
std::vector< ModelVertex > baseVertices
Bind-pose vertices (never mutated).
Definition CharacterRig.hpp:30
std::vector< SkinWeight > skinWeights
Parallel to baseVertices.
Definition CharacterRig.hpp:31
Per-vertex skin data — up to 4 bone influences, with parallel weights.
Definition CharacterRig.hpp:22
int boneIndices[4]
Definition CharacterRig.hpp:23
float weights[4]
Definition CharacterRig.hpp:24