[−][src]Struct newton::body::DynamicBody
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]
newton: &'a Newton,
collision: &C,
matrix: Mat4,
name: Option<&'static str>
) -> Self where
C: NewtonCollision,
Trait Implementations
impl<'a> NewtonBody for DynamicBody<'a>[src]
fn as_raw(&self) -> *const NewtonBody[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]
Self: Sized,
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]
F: FnMut(Body) + Send + 'static,
fn set_transform_callback<F>(&self, callback: F) where
F: FnMut(Body, Mat4, usize) + Send + 'static, [src]
F: FnMut(Body, Mat4, usize) + Send + 'static,
ⓘImportant traits for Joints<'a>fn joints(&self) -> Joints[src]
ⓘImportant traits for Joints<'a>
fn set_force_and_torque_callback<F>(&self, callback: F) where
F: FnMut(Body, Duration, usize) + Send + 'static, [src]
F: FnMut(Body, Duration, usize) + Send + 'static,
impl<'a> FromHandle<'a> for DynamicBody<'a>[src]
fn from_handle(newton: &'a Newton, handle: Handle) -> Option<Self>[src]
fn from_handle_owned(newton: &'a mut Newton, handle: Handle) -> Option<Self>[src]
impl<'a> IntoHandle for DynamicBody<'a>[src]
fn into_handle(self, newton: &Newton) -> Handle[src]
impl<'a> AsHandle for DynamicBody<'a>[src]
impl<'a> PartialEq<DynamicBody<'a>> for DynamicBody<'a>[src]
fn eq(&self, other: &DynamicBody<'a>) -> bool[src]
fn ne(&self, other: &DynamicBody<'a>) -> bool[src]
impl<'a> From<DynamicBody<'a>> for Body<'a>[src]
fn from(body: DynamicBody<'a>) -> Self[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]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>, [src]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,