Skip to main content

Module sample

Module sample 

Source
Expand description

The sampled layer: what a game runtime sees. A PoseGrid is a uniform time grid over [0, duration] sampled with glTF-spec interpolation semantics (lerp for T/S, shortest-path slerp for R, STEP hold, cubic-spline Hermite; clamp at the ends), then FK’d to model space.

For clips declared looping, the wrap pair is (last frame, frame 0) — the seam definition every loop check shares.

FK composes every skeleton node, including each root node’s own local transform. Metrics that need a body-relative frame derive it from resolved roles such as hips and feet.

Structs§

PoseGrid
Model-space and local poses for every (frame, bone) of one clip.

Enums§

TrackSample
One track’s sampled value at a time.

Functions§

default_frame_count
Default uniform-grid resolution for a clip: the maximum keyframe count across its tracks, with a minimum of 2. Irregular authored key times can still fall between these uniform samples.
sample_clip
Sample clip on a uniform frames-sample grid and FK to model space.
sample_track
Sample a single track at t with the same semantics the grid uses (clamp at ends, glTF interpolation, shortest-path slerp).