oa::anim
anim module in the OA Core public surface.
MdRust public API
Public Types
Public Functions
pub fn bake<T: AnimCurveValue>( curve: &AnimCurve<T>, start_time: Duration, frames_per_second: f32, frame_count: u32, wrap_mode: AnimWrapMode, ) -> Result<Vec<T>>pub fn create_clip( skeleton_id: u32, joint_count: u32, frames_per_second: f32, samples: &[Transform], ) -> Result<AnimClip>pub fn create_curve<T: AnimCurveValue>( interpolation: AnimInterpolation, keyframes: &[Keyframe<T>], ) -> Result<AnimCurve<T>>pub fn sample_clip( clip: &AnimClip, time_seconds: f64, wrap_mode: AnimWrapMode, ) -> Result<SkelPose>Function Documentation
Sample a curve uniformly into frame_count values beginning at start_time. Errors Returns an error for non-finite or non-positive frames_per_second, a zero frame_count, a sample time beyond the representable range, or a sampling failure. Donor: oa::FnAnim::bake.
Create a validated AnimClip from frame-major uniform samples. samples must hold a whole number of joint_count frames. Errors Returns an error for a zero joint count, non-finite or non-positive frames_per_second, empty or partial-frame samples, a non-finite transform, or a frame count beyond the supported range. Donor: oa::FnAnim::createClip.
Create a validated AnimCurve from strictly increasing keyframes. Quaternion curves normalize every keyframe value on construction. Errors Returns an error for empty or non-increasing keyframe times, non-finite or invalid values/tangents, an excessive count, or a time span that cannot be represented. Donor: oa::FnAnim::createCurve.
Create a validated SkelPose from local joint transforms. Errors Returns an error when local_transforms is empty, contains a non-finite transform, or exceeds the supported joint count. Donor: oa::FnAnim::createPose.
Extract the pose stored at frame. Errors Returns an error when the clip is invalid or frame is out of range. Donor: oa::FnAnim::getFrame.
Sample a clip at time_seconds, interpolating translation (lerp), rotation (slerp), scale, and shear per joint. Errors Returns an error when the clip is invalid or time_seconds is not finite. Donor: oa::FnAnim::sample(AnimClip).
Sample a curve at time under wrap_mode. Errors Returns an error when interpolation produces a non-finite or non-normalizable value. Donor: oa::FnAnim::sample(AnimCurve).
Re-validate an AnimClip. Errors Returns an error under the same contract as create_clip. Donor: oa::FnAnim::validate(AnimClip).
Re-validate an AnimCurve and every stored keyframe. Errors Returns an error under the same contract as create_curve. Donor: oa::FnAnim::validate(AnimCurve).
Re-validate a SkelPose. Errors Returns an error under the same contract as create_pose. Donor: oa::FnAnim::validate(SkelPose).