|
Toast Engine
|
A skeleton: the joint nodes a skinned mesh binds to. More...
#include <animation.hpp>
Public Member Functions | |
| auto | jointMatrices (std::span< const glm::mat4 > joint_world_transforms) const -> std::vector< glm::mat4 > |
| Builds the per-joint matrices a skinning shader multiplies vertices by. | |
A skeleton: the joint nodes a skinned mesh binds to.
jointMatrices() turns a posed node tree into the matrices a shader blends between. A mesh whose joints cannot be resolved gets no posed slice and falls back to bind pose rather than dropping
|
nodiscard |
Builds the per-joint matrices a skinning shader multiplies vertices by.
joint_world_transform * inverse_bind_matrix, so the product expresses only deformation away from bind - which is what the vertex weights blend between
| joint_world_transforms | World transforms of joints, same order. A missing entry falls back to identity rather than being skipped, so the result always matches joints.size() and a shader can index it without bounds checks |