Struct nphysics3d::object::RigidBody [−][src]
pub struct RigidBody<N: Real> { /* fields omitted */ }
A rigid body.
Methods
impl<N: Real> RigidBody<N>
[src]
impl<N: Real> RigidBody<N>
pub fn new(
handle: BodyHandle,
position: Isometry<N>,
local_inertia: Inertia<N>,
local_com: Point<N>
) -> Self
[src]
pub fn new(
handle: BodyHandle,
position: Isometry<N>,
local_inertia: Inertia<N>,
local_com: Point<N>
) -> Self
Create a new rigid body with the specified handle and dynamic properties.
pub fn activation_status(&self) -> &ActivationStatus<N>
[src]
pub fn activation_status(&self) -> &ActivationStatus<N>
Informations regarding activation and deactivation (sleeping) of this rigid body.
pub fn activation_status_mut(&mut self) -> &mut ActivationStatus<N>
[src]
pub fn activation_status_mut(&mut self) -> &mut ActivationStatus<N>
Mutable informations regarding activation and deactivation (sleeping) of this rigid body.
pub fn activate(&mut self)
[src]
pub fn activate(&mut self)
Force the activation of this rigid body.
pub fn activate_with_energy(&mut self, energy: N)
[src]
pub fn activate_with_energy(&mut self, energy: N)
Force the activation of this rigid body with the given level of energy.
pub fn deactivate(&mut self)
[src]
pub fn deactivate(&mut self)
Put this rigid body to sleep.
pub fn is_active(&self) -> bool
[src]
pub fn is_active(&self) -> bool
Return true
if this rigid body is kinematic or dynamic and awake.
pub fn status(&self) -> BodyStatus
[src]
pub fn status(&self) -> BodyStatus
The status of this rigid body.
pub fn set_status(&mut self, status: BodyStatus)
[src]
pub fn set_status(&mut self, status: BodyStatus)
Set the status of this body.
pub fn companion_id(&self) -> usize
[src]
pub fn companion_id(&self) -> usize
The companion ID of this rigid body.
pub fn set_companion_id(&mut self, id: usize)
[src]
pub fn set_companion_id(&mut self, id: usize)
Set the companion ID of this rigid body.
This value may be overriden by nphysics during a timestep.
pub fn is_dynamic(&self) -> bool
[src]
pub fn is_dynamic(&self) -> bool
Whether or not the status of this rigid body is dynamic.
pub fn is_static(&self) -> bool
[src]
pub fn is_static(&self) -> bool
Whether or not the status of this rigid body is static.
pub fn is_kinematic(&self) -> bool
[src]
pub fn is_kinematic(&self) -> bool
Whether or not the status of this rigid body is kinematic.
pub fn center_of_mass(&self) -> Point<N>
[src]
pub fn center_of_mass(&self) -> Point<N>
The center of mass of this rigid body.
pub fn velocity(&self) -> &Velocity<N>
[src]
pub fn velocity(&self) -> &Velocity<N>
The velocity of this rigid body.
pub fn set_position(&mut self, pos: Isometry<N>)
[src]
pub fn set_position(&mut self, pos: Isometry<N>)
Sets the position of this rigid body.
pub fn set_velocity(&mut self, vel: Velocity<N>)
[src]
pub fn set_velocity(&mut self, vel: Velocity<N>)
Set the velocity of this rigid body.
pub fn set_linear_velocity(&mut self, vel: Vector<N>)
[src]
pub fn set_linear_velocity(&mut self, vel: Vector<N>)
Set the linear velocity of this rigid body.
pub fn set_angular_velocity(&mut self, vel: AngularVector<N>)
[src]
pub fn set_angular_velocity(&mut self, vel: AngularVector<N>)
Set the angular velocity of this rigid body.
pub fn clear_dynamics(&mut self)
[src]
pub fn clear_dynamics(&mut self)
Reset the timestep-specific dynamic information of this rigid body.
pub fn update_dynamics(
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
[src]
pub fn update_dynamics(
&mut self,
gravity: &Vector<N>,
params: &IntegrationParameters<N>
)
Update the timestep-specific dynamic information of this rigid body.
pub fn local_inertia(&self) -> &Inertia<N>
[src]
pub fn local_inertia(&self) -> &Inertia<N>
The rigid body inertia in local-space.
pub fn inertia(&self) -> &Inertia<N>
[src]
pub fn inertia(&self) -> &Inertia<N>
The rigid body inertia in world-space.
pub fn augmented_mass(&self) -> &Inertia<N>
[src]
pub fn augmented_mass(&self) -> &Inertia<N>
The augmented mass (inluding gyroscropic terms) in world-space of this rigid body.
pub fn inv_augmented_mass(&self) -> &Inertia<N>
[src]
pub fn inv_augmented_mass(&self) -> &Inertia<N>
The inverse augmented mass (inluding gyroscropic terms) in world-space of this rigid body.
pub fn handle(&self) -> BodyHandle
[src]
pub fn handle(&self) -> BodyHandle
The handle of this rigid body.
pub fn ndofs(&self) -> usize
[src]
pub fn ndofs(&self) -> usize
The number of degrees of freedom of this rigid body.
pub fn generalized_velocity(&self) -> DVectorSlice<N>
[src]
pub fn generalized_velocity(&self) -> DVectorSlice<N>
The generalized velocities of this rigid body.
pub fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
[src]
pub fn generalized_velocity_mut(&mut self) -> DVectorSliceMut<N>
The mutable generalized velocities of this rigid body.
pub fn generalized_acceleration(&self) -> DVectorSlice<N>
[src]
pub fn generalized_acceleration(&self) -> DVectorSlice<N>
The generalized accelerations at each degree of freedom of this rigid body.
pub fn integrate(&mut self, params: &IntegrationParameters<N>)
[src]
pub fn integrate(&mut self, params: &IntegrationParameters<N>)
Integrate the position of this rigid body.
pub fn apply_displacement(&mut self, displacement: &Velocity<N>)
[src]
pub fn apply_displacement(&mut self, displacement: &Velocity<N>)
Apply a displacement to this rigid body.
Note that the applied displacement is given by displacement
multiplied by a time equal to 1.0
.
pub fn apply_force(&mut self, force: &Force<N>)
[src]
pub fn apply_force(&mut self, force: &Force<N>)
Apply a force to this rigid body for the next timestep.
pub fn position(&self) -> Isometry<N>
[src]
pub fn position(&self) -> Isometry<N>
The position of this rigid body wrt. the ground.
pub fn body_jacobian_mul_force(&self, force: &Force<N>, out: &mut [N])
[src]
pub fn body_jacobian_mul_force(&self, force: &Force<N>, out: &mut [N])
Convert a force applied to this rigid body center of mass into generalized force.
pub fn inv_mass_mul_generalized_forces(&self, out: &mut [N])
[src]
pub fn inv_mass_mul_generalized_forces(&self, out: &mut [N])
Convert generalized forces applied to this rigid body into generalized accelerations.
pub fn inv_mass_mul_force(&self, force: &Force<N>, out: &mut [N])
[src]
pub fn inv_mass_mul_force(&self, force: &Force<N>, out: &mut [N])
Convert a force applied to this rigid body's center of mass into generalized accelerations.