Struct skelly::Skelly[][src]

pub struct Skelly<T: Scalar, D = ()> { /* fields omitted */ }

One’s skeleton. Parameterized with numric value and bone userdata type.

Implementations

impl<T> Skelly<T> where
    T: Scalar
[src]

pub fn add_root(&mut self, position: Point3<T>) -> usize where
    T: RealField, 
[src]

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]

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]

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]

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]

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]

Rotate specified bone.

pub fn translate_bone(&mut self, bone: usize, translation: Translation3<T>) where
    T: RealField, 
[src]

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]

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]

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]

Makes the skelly to assume specifed posture.

pub fn make_posture(&self) -> Posture<T> where
    T: Copy
[src]

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

impl<T, D> Send for Skelly<T, D> where
    D: Send,
    T: Send

impl<T, D> Sync for Skelly<T, D> where
    D: Sync,
    T: Sync

impl<T, D> Unpin for Skelly<T, D> where
    D: Unpin,
    T: Unpin

impl<T, D> UnwindSafe for Skelly<T, D> where
    D: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.