[][src]Struct newton::body::DynamicBody

pub struct DynamicBody<'a> { /* fields omitted */ }

Dynamic body wrapper.

If a dynamic body has no mass, it is equivalent to a static body.

Methods

impl<'a> DynamicBody<'a>[src]

pub unsafe fn from_raw(raw: *const NewtonBody, owned: bool) -> Self[src]

pub fn release(self)[src]

Forgets about this body. It will be freed along the world If you want to reference the object later, you should call into_handle instead.

pub fn create<C>(
    newton: &'a Newton,
    collision: &C,
    matrix: Mat4,
    name: Option<&'static str>
) -> Self where
    C: NewtonCollision
[src]

Trait Implementations

impl<'a> NewtonBody for DynamicBody<'a>[src]

fn matrix(&self) -> Mat4[src]

fn set_continuous(&self, cont: bool)[src]

fn is_continuous(&self) -> bool[src]

fn set_matrix(&self, matrix: Mat4)[src]

fn position(&self) -> Vec3[src]

fn into_raw(self) -> *const NewtonBody where
    Self: Sized
[src]

fn velocity(&self) -> Vec3[src]

fn aabb(&self) -> (Vec3, Vec3)[src]

fn sleep_state(&self) -> SleepState[src]

fn set_sleep_state(&self, state: SleepState)[src]

fn set_active(&self)[src]

fn set_sleeping(&self)[src]

fn set_force(&self, force: Vec3)[src]

fn set_collision<C: NewtonCollision>(&self, collision: C)[src]

fn collision(&self) -> Collision[src]

fn name(&self) -> Option<&'static str>[src]

fn mass(&self) -> (f32, Vec3)[src]

fn set_mass<C: NewtonCollision>(&self, mass: f32, collision: &C)[src]

fn set_destroy_callback<F>(&self, callback: F) where
    F: FnMut(Body) + Send + 'static, 
[src]

fn set_transform_callback<F>(&self, callback: F) where
    F: FnMut(Body, Mat4, usize) + Send + 'static, 
[src]

Important traits for Joints<'a>
fn joints(&self) -> Joints[src]

fn set_force_and_torque_callback<F>(&self, callback: F) where
    F: FnMut(Body, Duration, usize) + Send + 'static, 
[src]

impl<'a> FromHandle<'a> for DynamicBody<'a>[src]

impl<'a> IntoHandle for DynamicBody<'a>[src]

impl<'a> AsHandle for DynamicBody<'a>[src]

impl<'a> PartialEq<DynamicBody<'a>> for DynamicBody<'a>[src]

impl<'a> From<DynamicBody<'a>> for Body<'a>[src]

impl<'a> Drop for DynamicBody<'a>[src]

impl<'a> Eq for DynamicBody<'a>[src]

impl<'a> Debug for DynamicBody<'a>[src]

Auto Trait Implementations

impl<'a> !Send for DynamicBody<'a>

impl<'a> !Sync for DynamicBody<'a>

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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