[][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 linear_motion_interpolation_enabled(&self) -> bool[src]

Check if linear motion interpolation is enabled for CCD.

If this is disabled, non-linear interpolation will be used.

pub fn enable_linear_motion_interpolation(&mut self, enabled: bool)[src]

Enable linear motion interpolation for CCD.

If this is disabled, non-linear interpolation will be used.

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 set_linear_damping(&mut self, damping: N)[src]

Sets the linear damping coefficient of this rigid body.

Linear damping will make the rigid body loose linear velocity automatically velocity at each timestep. There is no damping by default.

pub fn linear_damping(&self) -> N[src]

The linear damping coefficient of this rigid body.

pub fn set_angular_damping(&mut self, damping: N)[src]

Sets the angular damping coefficient of this rigid body.

Angular damping will make the rigid body loose angular velocity automatically velocity at each timestep. There is no damping by default.

pub fn angular_damping(&self) -> N[src]

The angular damping coefficient of this rigid body.

pub fn set_max_linear_velocity(&mut self, max_vel: N)[src]

Caps the linear velocity of this rigid body to the given maximum.

This will prevent a rigid body from having a linear velocity with magnitude greater than max_vel.

pub fn max_linear_velocity(&self) -> N[src]

The maximum allowed linear velocity of this rigid body.

pub fn set_max_angular_velocity(&mut self, max_vel: N)[src]

Caps the angular velocity of this rigid body to the given maximum.

This will prevent a rigid body from having a angular velocity with magnitude greater than max_vel.

pub fn max_angular_velocity(&self) -> N[src]

The maximum allowed angular velocity of this rigid body.

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]

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

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

Auto Trait Implementations

impl<N> !RefUnwindSafe for RigidBody<N>

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

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

impl<N> Unpin for RigidBody<N> where
    N: Scalar + Unpin

impl<N> !UnwindSafe for RigidBody<N>

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,