pub struct Skeleton {
pub name: String,
pub joints: Vec<Joint>,
}Expand description
A joint hierarchy in bind pose. Skeletons are reusable assets; scene nodes
instantiate them via NodeKind::SkeletonInstance.
Fields§
§name: String§joints: Vec<Joint>Implementations§
Source§impl Skeleton
impl Skeleton
pub fn new(name: impl Into<String>) -> Self
Sourcepub fn add_joint(
&mut self,
name: impl Into<String>,
parent: Option<usize>,
local: Transform,
) -> usize
pub fn add_joint( &mut self, name: impl Into<String>, parent: Option<usize>, local: Transform, ) -> usize
Append a joint; returns its index.
pub fn joint_by_name(&self, name: &str) -> Option<usize>
Sourcepub fn global_transform(&self, joint: usize) -> Transform
pub fn global_transform(&self, joint: usize) -> Transform
Global (bind-pose) transform of a joint relative to the skeleton root space.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Skeleton
impl<'de> Deserialize<'de> for Skeleton
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Skeleton
Auto Trait Implementations§
impl Freeze for Skeleton
impl RefUnwindSafe for Skeleton
impl Send for Skeleton
impl Sync for Skeleton
impl Unpin for Skeleton
impl UnsafeUnpin 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