Skip to main content

sample_track

Function sample_track 

Source
pub fn sample_track(track: &Track, t: f32) -> TrackSample
Expand description

Sample a single track at t with the same semantics the grid uses (clamp at ends, glTF interpolation, shortest-path slerp).

Hostile or incomplete tracks are tolerated: empty/non-finite timelines choose a clamped segment where possible, and missing values default to zero vectors or the identity quaternion. This function does not validate a crate::Document because it receives only one track.