Struct skelly::Skelly [−][src]
One’s skeleton. Parameterized with numric value and bone userdata type.
Implementations
impl<T> Skelly<T> where
T: Scalar,
[src]
T: Scalar,
pub fn add_root(&mut self, position: Point3<T>) -> usize where
T: RealField,
[src]
T: RealField,
Add root bone to the skelly. E.g. one with not parent bone.
pub fn attach(&mut self, relative_position: Point3<T>, parent: usize) -> usize where
T: RealField,
[src]
T: RealField,
Attach a bone to an existing bone. New bone is attached to the parent bone with specified relative position.
impl<T, D> Skelly<T, D> where
T: Scalar,
[src]
T: Scalar,
pub fn new() -> Self
[src]
Returns new empty skelly.
pub fn add_root_with(&mut self, position: Point3<T>, userdata: D) -> usize where
T: RealField,
[src]
T: RealField,
Add root bone to the skelly. E.g. one with not parent bone.
pub fn attach_with(
&mut self,
relative_position: Point3<T>,
parent: usize,
userdata: D
) -> usize where
T: RealField,
[src]
&mut self,
relative_position: Point3<T>,
parent: usize,
userdata: D
) -> usize where
T: RealField,
Attach a bone to an existing bone. New bone is attached to the parent bone with specified displacement.
pub fn rotate(&mut self, bone: usize, rotation: UnitQuaternion<T>) where
T: RealField,
[src]
T: RealField,
Rotate specified bone.
pub fn translate_bone(&mut self, bone: usize, translation: Translation3<T>) where
T: RealField,
[src]
T: RealField,
Move specified bone.
pub fn set_bone_position(&mut self, bone: usize, position: Point3<T>)
[src]
Set position for specified bone.
pub fn get_userdata(&self, bone: usize) -> &D
[src]
Returns reference to userdata attached to the bone.
pub fn get_userdata_mut(&mut self, bone: usize) -> &mut D
[src]
Returns mutable reference to userdata attached to the bone.
pub fn get_parent(&self, bone: usize) -> Option<usize>
[src]
pub fn len(&self) -> usize
[src]
Returns number of bones in the skelly.
pub fn write_globals(&self, globals: &mut [Isometry3<T>]) where
T: RealField,
[src]
T: RealField,
Fill slice of Mat4
with global isometrys
for each bone of the skelly in specified posture.
pub fn write_globals_for_posture(
&self,
posture: &Posture<T>,
globals: &mut [Isometry3<T>]
) where
T: RealField,
[src]
&self,
posture: &Posture<T>,
globals: &mut [Isometry3<T>]
) where
T: RealField,
Fill slice of Mat4
with global isometrys
for each bone of the skelly in specified posture.
pub fn assume_posture(&mut self, posture: &Posture<T>) where
T: Copy,
[src]
T: Copy,
Makes the skelly to assume specifed posture.
pub fn make_posture(&self) -> Posture<T> where
T: Copy,
[src]
T: Copy,
Make Posture
instance out of the skelly.
pub fn make_chain(&self, bone: usize, chain: &mut Vec<usize>)
[src]
Auto Trait Implementations
impl<T, D> RefUnwindSafe for Skelly<T, D> where
D: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> Send for Skelly<T, D> where
D: Send,
T: Send,
D: Send,
T: Send,
impl<T, D> Sync for Skelly<T, D> where
D: Sync,
T: Sync,
D: Sync,
T: Sync,
impl<T, D> Unpin for Skelly<T, D> where
D: Unpin,
T: Unpin,
D: Unpin,
T: Unpin,
impl<T, D> UnwindSafe for Skelly<T, D> where
D: UnwindSafe,
T: UnwindSafe,
D: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,