pub struct SkeletonRig3D { /* private fields */ }Expand description
Hierarchical 3D skeletal rig evaluating forward kinematics across bone chains.
Implementations§
Source§impl SkeletonRig3D
Hierarchical forward-kinematics solver for SkeletonRig3D.
impl SkeletonRig3D
Hierarchical forward-kinematics solver for SkeletonRig3D.
Sourcepub fn add_joint(
&mut self,
name: &str,
parent: Option<usize>,
rest_transform: Transform3D,
) -> usize
pub fn add_joint( &mut self, name: &str, parent: Option<usize>, rest_transform: Transform3D, ) -> usize
Sourcepub fn sample_pose_snapshot(
&self,
clip: &AnimationClip3D,
time_secs: f32,
cut: bool,
) -> SkeletonPoseSnapshot
pub fn sample_pose_snapshot( &self, clip: &AnimationClip3D, time_secs: f32, cut: bool, ) -> SkeletonPoseSnapshot
Samples normalized local joint transforms at time_secs for clip into a SkeletonPoseSnapshot.
§Arguments
&Self- Skeleton rig reference.&AnimationClip3D- Active animation clip.f32- Playback timestamp in seconds.bool- Whether this sample represents a discontinuous animation cut.
§Returns
SkeletonPoseSnapshot- Immutable local joint pose snapshot suitable for render-time interpolation.
Sourcepub fn evaluate_world_matrices(
&self,
pose: &SkeletonPoseSnapshot,
root_world: Transform3D,
) -> Vec<Mat4>
pub fn evaluate_world_matrices( &self, pose: &SkeletonPoseSnapshot, root_world: Transform3D, ) -> Vec<Mat4>
Evaluates hierarchical world-space Mat4 joint palettes from an interpolated SkeletonPoseSnapshot.
§Arguments
&Self- Skeleton rig reference.&SkeletonPoseSnapshot- Local joint pose snapshot (e.g. interpolated between two fixed steps).Transform3D- Interpolated root world transform of the animated actor.
§Returns
Vec<Mat4>- World-space bone matrices indexed by joint id.
Sourcepub fn sample_world_matrices(
&self,
clip: &AnimationClip3D,
time_secs: f32,
root_world: Transform3D,
) -> Vec<Mat4>
pub fn sample_world_matrices( &self, clip: &AnimationClip3D, time_secs: f32, root_world: Transform3D, ) -> Vec<Mat4>
Evaluates hierarchical world-space Mat4 joint palettes at time_secs for clip.
§Arguments
&Self- Skeleton rig reference.&AnimationClip3D- Active animation clip.f32- Playback timestamp in seconds.Transform3D- Root world transform of the animated actor.
§Returns
Vec<Mat4>- World-space bone matrices indexed by joint id.
Source§impl SkeletonRig3D
impl SkeletonRig3D
pub fn get_joints(&self) -> &Vec<SkeletonJoint3D>
pub fn get_mut_joints(&mut self) -> &mut Vec<SkeletonJoint3D>
pub fn set_joints(&mut self, val: Vec<SkeletonJoint3D>) -> &mut Self
Trait Implementations§
Source§impl Clone for SkeletonRig3D
impl Clone for SkeletonRig3D
Source§impl Debug for SkeletonRig3D
impl Debug for SkeletonRig3D
Source§impl Default for SkeletonRig3D
impl Default for SkeletonRig3D
Source§impl PartialEq for SkeletonRig3D
impl PartialEq for SkeletonRig3D
impl StructuralPartialEq for SkeletonRig3D
Auto Trait Implementations§
impl Forget for SkeletonRig3D
impl Freeze for SkeletonRig3D
impl Move for SkeletonRig3D
impl RefUnwindSafe for SkeletonRig3D
impl Send for SkeletonRig3Dwhere
RawVecInner: Send,
impl Sync for SkeletonRig3Dwhere
RawVecInner: Sync,
impl Unpin for SkeletonRig3D
impl UnsafeUnpin for SkeletonRig3D
impl UnwindSafe for SkeletonRig3Dwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more