[][src]Struct nphysics3d::object::RigidBody

pub struct RigidBody<N: RealField> { /* fields omitted */ }

A rigid body.

Methods

impl<N: RealField> RigidBody<N>[src]

pub fn user_data(&self) -> Option<&(dyn Any + Send + Sync)>[src]

Retrieves a reference to the user-defined user-data attached to this object.

pub fn user_data_mut(&mut self) -> Option<&mut (dyn Any + Send + Sync)>[src]

Retrieves a mutable reference to the user-defined user-data attached to this object.

pub fn set_user_data(
    &mut self,
    data: Option<Box<dyn Any + Send + Sync>>
) -> Option<Box<dyn Any + Send + Sync>>
[src]

Sets the user-defined data attached to this object.

pub fn take_user_data(&mut self) -> Option<Box<dyn Any + Send + Sync>>[src]

Replace by None the user-defined data attached to this object and returns the old value.

pub fn set_translations_kinematic(&mut self, is_kinematic: Vector<bool>)[src]

Mark some translational degrees of freedom as kinematic.

pub fn set_rotations_kinematic(&mut self, is_kinematic: Vector<bool>)[src]

Mark some rotational degrees of freedom as kinematic.

pub fn kinematic_translations(&self) -> Vector<bool>[src]

Flags indicating which translational degrees of freedoms are kinematic.

pub fn kinematic_rotations(&self) -> Vector<bool>[src]

Flags indicating which rotational degrees of freedoms are kinematic.

pub fn disable_all_rotations(&mut self)[src]

Disable all rotations of this rigid body.

This is the same as setting all the rotations of this rigid body as kinematic and setting its angular velocity to zero. The rotations will still be controllable at the velocity level by the user afterwards.

pub fn enable_all_rotations(&mut self)[src]

Enable all rotations for this rigid body.

This is the same as setting all the rotations of this rigid body as non-kinematic.

pub fn disable_all_translations(&mut self)[src]

Disable all translations of this rigid body.

This is the same as setting all the translations of this rigid body as kinematic and setting its linear velocity to zero. The translations will still be controllable at the velocity level by the user afterwards.

pub fn enable_all_translations(&mut self)[src]

Enable all translations for this rigid body.

This is the same as setting all the translations of this rigid body as non-kinematic.

pub fn handle(&self) -> BodyHandle[src]

The handle of this rigid body.

pub fn part_handle(&self) -> BodyPartHandle[src]

The part-handle of this rigid body.

The part id is set to 0 though any value is acceptable.

pub fn activation_status_mut(&mut self) -> &mut ActivationStatus<N>[src]

Mutable information regarding activation and deactivation (sleeping) of this rigid body.

pub fn set_local_center_of_mass(&mut self, local_com: Point<N>)[src]

Set the center of mass of this rigid body, expressed in its local space.

pub fn set_local_inertia(&mut self, local_inertia: Inertia<N>)[src]

Set the local inertia of this rigid body, expressed in its local space.

pub fn set_mass(&mut self, mass: N)[src]

Set the mass of this rigid body.

pub fn set_angular_inertia(&mut self, angular_inertia: Matrix3<N>)[src]

Set the angular inertia of this rigid body, expressed in its local space.

pub fn set_position(&mut self, pos: Isometry<N>)[src]

Sets the position of this rigid body.

pub fn set_velocity(&mut self, vel: Velocity<N>)[src]

Set the velocity of this rigid body.

pub fn set_linear_velocity(&mut self, vel: Vector<N>)[src]

Set the linear velocity of this rigid body.

pub fn set_angular_velocity(&mut self, vel: AngularVector<N>)[src]

Set the angular velocity of this rigid body.

pub fn augmented_mass(&self) -> &Inertia<N>[src]

The augmented mass (inluding gyroscropic terms) in world-space of this rigid body.

pub fn inv_augmented_mass(&self) -> &Inertia<N>[src]

The inverse augmented mass (inluding gyroscropic terms) in world-space of this rigid body.

pub fn position(&self) -> &Isometry<N>[src]

The position of this rigid body.

pub fn velocity(&self) -> &Velocity<N>[src]

The velocity of this rigid body.

Trait Implementations

impl<N: RealField> Body<N> for RigidBody<N>[src]

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

Returns true if this body is the ground.

fn update_activation_status(&mut self)[src]

Update whether this body needs to be waken up after a user-interaction.

fn status_dependent_ndofs(&self) -> usize[src]

The number of degrees of freedom (DOF) of this body, taking its status into account. Read more

fn status_dependent_body_part_velocity(
    &self,
    part: &dyn BodyPart<N>
) -> Velocity<N>
[src]

The velocity of the specified body part, taking this body status into account. Read more

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

Check if this body is active.

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

Whether or not the status of this body is dynamic.

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

Whether or not the status of this body is kinematic.

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

Whether or not the status of this body is static.

fn activate(&mut self)[src]

Force the activation of this body.

impl<N: RealField> BodyPart<N> for RigidBody<N>[src]

impl<N: Debug + RealField> Debug for RigidBody<N>[src]

Auto Trait Implementations

impl<N> Send for RigidBody<N> where
    N: Scalar

impl<N> Sync for RigidBody<N> where
    N: Scalar

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?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

The type returned in the event of a conversion error.

impl<T> Downcast for T where
    T: Any
[src]

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self