pub struct Skeleton { /* private fields */ }Implementations§
Source§impl Skeleton
impl Skeleton
Sourcepub fn new(joints: Vec<Joint>) -> Result<Skeleton, SceneError>
pub fn new(joints: Vec<Joint>) -> Result<Skeleton, SceneError>
Joints must be parent-before-child; this also proves acyclic hierarchy.
pub fn joint_count(&self) -> usize
Sourcepub fn joints(&self) -> &[Joint]
pub fn joints(&self) -> &[Joint]
Borrow the validated parent order and inverse-bind data without cloning. Joint names and local rest poses remain caller-owned authoring metadata.
pub fn world_pose( &self, locals: &[Transform], ) -> Result<Vec<[f32; 16]>, SceneError>
Sourcepub fn world_pose_into(
&self,
locals: &[Transform],
world: &mut [[f32; 16]],
) -> Result<(), SceneError>
pub fn world_pose_into( &self, locals: &[Transform], world: &mut [[f32; 16]], ) -> Result<(), SceneError>
Allocation-free pose evaluation into caller-owned scratch. On numeric overflow output may be partially written; use it only after Ok(()).
Sourcepub fn skin_palette(
&self,
locals: &[Transform],
) -> Result<Vec<[f32; 16]>, SceneError>
pub fn skin_palette( &self, locals: &[Transform], ) -> Result<Vec<[f32; 16]>, SceneError>
Model-space joint world pose multiplied by inverse bind, ready for skinning.
Sourcepub fn skin_palette_into(
&self,
locals: &[Transform],
world: &mut [[f32; 16]],
palette: &mut [[f32; 16]],
) -> Result<(), SceneError>
pub fn skin_palette_into( &self, locals: &[Transform], world: &mut [[f32; 16]], palette: &mut [[f32; 16]], ) -> Result<(), SceneError>
Model-space world * inverse-bind using preallocated buffers. Both outputs are scratch on error. No heap allocation or hierarchy traversal recursion.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Skeleton
impl RefUnwindSafe for Skeleton
impl Send for Skeleton
impl Sync for Skeleton
impl Unpin for Skeleton
impl UnwindSafe for Skeleton
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