46 [[nodiscard]] uint32_t
Count()
const {
return static_cast<uint32_t
>(
joints.size()); }
111 void Resize(uint32_t jointCount);
#define GLOBAL_ALLOC
Definition Allocator.hpp:225
FAnimInterp
Keyframe interpolation mode (mirrors glTF sampler interpolation).
Definition Animation.hpp:59
FAnimPath
Which local TRS component an animation channel drives.
Definition Animation.hpp:51
void SampleClip(FAnimationClip const &clip, float t, FPose &pose)
Samples a clip at time t, overwriting the seeded local TRS for every channel's joint.
Definition Animation.cpp:110
void RecomputeNormals(Span< FVertex > verts, Span< const uint32_t > indices)
Recomputes smooth per-vertex normals from positions over an indexed triangle list.
Definition Animation.cpp:226
void ResetToRest(FSkeleton const &skel, FPose &pose)
Seeds a pose's local TRS from the skeleton rest pose (call before SampleClip).
Definition Animation.cpp:99
void SkinVertices(Span< const FVertex > bind, Span< const FSkinBinding > binding, Span< const mat4 > palette, Span< FQVertex > out)
Linear-blend skins bind-pose vertices by the palette, packing results for the dynamic ring.
Definition Animation.cpp:190
void SampleTrack(Span< const float > times, Span< const float > values, uint32_t comps, FAnimInterp interp, float t, Span< float > out)
Samples a generic keyframed track of comps-wide values at time t into out.
Definition Animation.cpp:140
void ComputeSkinningMatrices(FSkeleton const &skel, FPose const &pose, Span< mat4 > outPalette)
Builds the skinning palette globals[j] * inverseBind[j] into outPalette.
Definition Animation.cpp:182
mat4 JointLocalMatrix(float3 const &t, quat const &r, float3 const &s)
Composes a joint's local TRS into a matrix (T * R * S).
Definition Animation.cpp:86
void ComputeGlobals(FSkeleton const &skel, FPose &pose)
Walks the hierarchy, composing local TRS into world matrices in FPose::globals.
Definition Animation.cpp:126
General Purpose Allocator (GPA) interface.
Definition Allocator.hpp:24
std::vector< T, StlAllocator< T > > Vector
std::vector with explicit Foundation::Core::StlAllocator constructor
Definition Container.hpp:130
std::span< T > Span
Alias for std::span
Definition Container.hpp:60
vec3 float3
Definition Math.hpp:26
Definition Allocator.hpp:5
A single animated component of a single joint: sorted keyframe times + packed values.
Definition Animation.hpp:73
Vector< float > times
Definition Animation.hpp:77
FAnimPath path
Definition Animation.hpp:75
FAnimChannel(Allocator *alloc=GLOBAL_ALLOC)
Definition Animation.hpp:79
uint32_t joint
Definition Animation.hpp:74
FAnimInterp interp
Definition Animation.hpp:76
Vector< float > values
Definition Animation.hpp:78
A clip: a set of channels plus its total duration (seconds).
Definition Animation.hpp:88
int32_t skeleton
Definition Animation.hpp:91
FAnimationClip(Allocator *alloc=GLOBAL_ALLOC)
Definition Animation.hpp:92
float duration
Definition Animation.hpp:90
Vector< FAnimChannel > channels
Definition Animation.hpp:89
One node of a transform hierarchy (a skeleton joint or an articulation node).
Definition Animation.hpp:31
int32_t parent
Definition Animation.hpp:32
float3 restTranslation
Definition Animation.hpp:33
float3 restScale
Definition Animation.hpp:35
quat restRotation
Definition Animation.hpp:34
mat4 inverseBind
Definition Animation.hpp:36
Reusable per-instance evaluation scratch for one skeleton (allocate once, reuse per frame).
Definition Animation.hpp:102
Vector< mat4 > globals
Definition Animation.hpp:106
FPose(Allocator *alloc=GLOBAL_ALLOC)
Definition Animation.hpp:107
Vector< quat > rotations
Definition Animation.hpp:104
Vector< float3 > scales
Definition Animation.hpp:105
Vector< float3 > translations
Definition Animation.hpp:103
void Resize(uint32_t jointCount)
Definition Animation.cpp:91
A flat skeleton: the only hierarchy the animation layer retains, owned by the asset.
Definition Animation.hpp:43
FSkeleton(Allocator *alloc=GLOBAL_ALLOC)
Definition Animation.hpp:45
Vector< FJoint > joints
Definition Animation.hpp:44
uint32_t Count() const
Definition Animation.hpp:46