|
Foundation
|
Functions | |
| mat4 | JointLocalMatrix (float3 const &t, quat const &r, float3 const &s) |
| Composes a joint's local TRS into a matrix (T * R * S). | |
| void | ResetToRest (FSkeleton const &skel, FPose &pose) |
| Seeds a pose's local TRS from the skeleton rest pose (call before SampleClip). | |
| 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. | |
| void | ComputeGlobals (FSkeleton const &skel, FPose &pose) |
| Walks the hierarchy, composing local TRS into world matrices in FPose::globals. | |
| 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. | |
| void | ComputeSkinningMatrices (FSkeleton const &skel, FPose const &pose, Span< mat4 > outPalette) |
Builds the skinning palette globals[j] * inverseBind[j] into outPalette. | |
| 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. | |
| void | RecomputeNormals (Span< FVertex > verts, Span< const uint32_t > indices) |
| Recomputes smooth per-vertex normals from positions over an indexed triangle list. | |
Walks the hierarchy, composing local TRS into world matrices in FPose::globals.
| void ComputeSkinningMatrices | ( | FSkeleton const & | skel, |
| FPose const & | pose, | ||
| Span< mat4 > | outPalette | ||
| ) |
Builds the skinning palette globals[j] * inverseBind[j] into outPalette.
| outPalette | Must hold FSkeleton::Count matrices. |
Composes a joint's local TRS into a matrix (T * R * S).
Recomputes smooth per-vertex normals from positions over an indexed triangle list.
Area-weighted face-normal accumulation, then normalize. Needed after POSITION-only morph deformation (which moves vertices without supplying normals); run it on the morphed vertices before packing/skinning so shading matches the deformed surface. Tangents are left as-is (re-projected onto the new normal frame by FQVertex::PackTBN).
Seeds a pose's local TRS from the skeleton rest pose (call before SampleClip).
| 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.
t is clamped per channel to its key range. | 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.
Same time/value packing and interpolation rules as FAnimChannel (step/linear/cubic, clamped to the key range). Used for morph-target weight tracks (comps == target count).
| out | Must be exactly comps wide. |
| 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.
| bind | Rest-pose, full-precision vertices (positions/normals/tangents in bind space). |
| binding | Per-vertex joint indices + weights (parallel to bind). |
| palette | Skinning matrices from ComputeSkinningMatrices. |
| out | Destination quantized vertices (size == bind.size()); write straight into the span returned by GPUScene::UpdateDynamicGeometry. |