pub struct PoseBlendLibrary { /* private fields */ }Expand description
Library of corrective shapes
Implementations§
Source§impl PoseBlendLibrary
impl PoseBlendLibrary
pub fn new() -> Self
pub fn add_shape(&mut self, shape: PoseCorrectiveShape)
pub fn shape_count(&self) -> usize
pub fn shapes_for_joint(&self, joint_name: &str) -> Vec<&PoseCorrectiveShape>
pub fn get_shape(&self, name: &str) -> Option<&PoseCorrectiveShape>
pub fn remove_shape(&mut self, name: &str) -> bool
Sourcepub fn compute_weights<'a>(
&'a self,
rotations: &[JointRotation],
) -> Vec<(&'a PoseCorrectiveShape, f32)>
pub fn compute_weights<'a>( &'a self, rotations: &[JointRotation], ) -> Vec<(&'a PoseCorrectiveShape, f32)>
Compute active weights for all shapes given current joint rotations
Sourcepub fn apply_corrections(
&self,
positions: &[[f32; 3]],
rotations: &[JointRotation],
) -> Vec<[f32; 3]>
pub fn apply_corrections( &self, positions: &[[f32; 3]], rotations: &[JointRotation], ) -> Vec<[f32; 3]>
Apply all active corrective shapes to vertex positions. Returns new positions with corrections applied.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PoseBlendLibrary
impl RefUnwindSafe for PoseBlendLibrary
impl Send for PoseBlendLibrary
impl Sync for PoseBlendLibrary
impl Unpin for PoseBlendLibrary
impl UnsafeUnpin for PoseBlendLibrary
impl UnwindSafe for PoseBlendLibrary
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more