[−][src]Enum newton::body::Body
Enum grouping all body types.
Variants
Dynamic(DynamicBody<'a>)Kinematic(KinematicBody<'a>)Methods
impl<'a> Body<'a>[src]
pub fn dynamic(self) -> Option<DynamicBody<'a>>[src]
pub fn kinematic(self) -> Option<KinematicBody<'a>>[src]
pub fn is_dynamic(&self) -> bool[src]
pub fn is_kinematic(&self) -> bool[src]
Trait Implementations
impl<'a> NewtonBody for Body<'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 Body<'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 Body<'a>[src]
fn into_handle(self, newton: &Newton) -> Handle[src]
impl<'a> AsHandle for Body<'a>[src]
impl<'a> PartialEq<Body<'a>> for Body<'a>[src]
impl<'a> From<DynamicBody<'a>> for Body<'a>[src]
fn from(body: DynamicBody<'a>) -> Self[src]
impl<'a> From<KinematicBody<'a>> for Body<'a>[src]
fn from(body: KinematicBody<'a>) -> Self[src]
impl<'a> Eq for Body<'a>[src]
impl<'a> Debug for Body<'a>[src]
Auto Trait Implementations
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,