[−][src]Trait physx::rigid_body::RigidBody
Provided methods
pub fn set_mass(&mut self, mass: f32)
[src]
Set the mass of this body
pub fn get_angular_velocity(&self) -> PxVec3
[src]
Get the angular velocity.
pub fn get_linear_velocity(&self) -> PxVec3
[src]
Get the linear velocity.
pub fn get_velocities(&self) -> (PxVec3, PxVec3)
[src]
Get the (linear, angular) velocities.
pub fn set_c_mass_local_pose(&mut self, pose: &PxTransform)
[src]
Set the pose of the position and orientation of the center of mass. This does not move tha body, Setting the center of mass too far away may cause instability.
pub fn get_c_mass_local_pose(&self) -> PxTransform
[src]
Get the pose of the center of mass.
pub fn get_mass(&self) -> f32
[src]
Get the mass of the body.
pub fn get_inv_mass(&self) -> f32
[src]
Get the inverse of the mass of this body.
pub fn set_mass_space_inertia_tensor(&mut self, m: &PxVec3)
[src]
Sets the inertia tensor using mass space coordinates. Non-diagonal space inertia tensors
must be diagonalized, only the diagonal is passed in. The tensor elements must be non-negative.
Values of 0 represent infinite inertia along that axis, and are not permitted for PxArticulationLink
s.
pub fn get_mass_space_inertia_tensor(&self) -> PxVec3
[src]
Gets the diagonal of the inertia tensor relative to the body's mass coordinate frame. A value of 0 represents infinite inertia along that axis.
pub fn get_mass_space_inv_inertia_tensor(&self) -> PxVec3
[src]
Gets the diagonal of the inverse inertia tensor relative to the body's mass coordinate frame. A value of 0 represents infinite inertia along that axis.
pub fn set_linear_damping(&mut self, lin_damp: f32)
[src]
Sets the linear damping. Zero represents no damping. Values clamped to [0.0 .. ].
pub fn get_linear_damping(&self) -> f32
[src]
Gets the linear damping.
pub fn set_angular_damping(&mut self, ang_damp: f32)
[src]
Sets the angular damping. Zero represents no damping. Values clamped to (0.0, .. ).
pub fn get_angular_damping(&self) -> f32
[src]
Get the angular damping.
pub fn set_linear_velocity(&mut self, lin_vel: &PxVec3, autowake: bool)
[src]
Set the linear velocity. Continuously setting this will override the effects of gravity or friction because forces effect the body via velocity. If ActorFlag::DisableSimulation is set, this does nothing, otherwise this call will wake the actor.
pub fn set_angular_velocity(&mut self, ang_vel: &PxVec3, autowake: bool)
[src]
Set the angular velocity. Continuously setting this will override the effects of gravity or friction because forces effect the body via velocity. If ActorFlag::DisableSimulation is set, this does nothing, otherwise this call will wake the actor.
pub fn set_max_angular_velocity(&mut self, max_ang_vel: f32)
[src]
Set the maximum angular velocity. Very rapid rotation can cause simulation errors, setting this value will clamp velocty before the solver is ran (so velocty may briefly exceed this value).
pub fn get_max_angular_velocity(&self) -> f32
[src]
Get the maximum angular velocity.
pub fn set_max_linear_velocity(&mut self, max_lin_vel: f32)
[src]
Set the maximum linear velocity. Very rapid movement can cause simulation errors, setting this value will clamp velocty before the solver is ran (so velocty may briefly exceed this value).
pub fn get_max_linear_velocity(&self) -> f32
[src]
Get the maximum linear velocity.
pub fn add_force(&mut self, force: &PxVec3, mode: ForceMode, autowake: bool)
[src]
Apply a force to the actor. This will not cause torque. ForceMode determines how this force is applied.
ForceMode::Acceleration
and ForceMode::VelocityChange
directly effect the acceleration and velocity change
accumulators. ForceMode::Force
and ForceMode::Impulse
are multiplied by inverse mass first.
pub fn add_torque(&mut self, torque: &PxVec3, mode: ForceMode, autowake: bool)
[src]
Apply a torque to the actor. ForceMode determines how this force is applied. ForceMode::Acceleration
and ForceMode::VelocityChange
directly effect the angular acceleration and angular velocity change
accumulators. ForceMode::Force
and ForceMode::Impulse
are multiplied by inverse mass first.
pub fn clear_force(&mut self, mode: ForceMode)
[src]
Clear the accumulated acceleration or velocity change. ForceMode::Acceleration
and ForceMode::Force
clear the same accumulator, as do ForceMode::VelocityChange
and ForceMode::Impulse
.
pub fn clear_torque(&mut self, mode: ForceMode)
[src]
Clear the accumulated angular acceleration or angular velocity change. ForceMode::Acceleration
and ForceMode::Force
clear the same accumulator, as do ForceMode::VelocityChange
and ForceMode::Impulse
.
pub fn set_force_and_torque(
&mut self,
force: &PxVec3,
torque: &PxVec3,
mode: ForceMode
)
[src]
&mut self,
force: &PxVec3,
torque: &PxVec3,
mode: ForceMode
)
Set the force and torque accumulators.
pub fn set_rigid_body_flag(&mut self, flag: RigidBodyFlag, value: bool)
[src]
Set a rigid body flag.
pub fn set_rigid_body_flags(&mut self, flags: RigidBodyFlags)
[src]
Set all the rigid body flags.
pub fn get_rigid_body_flags(&self) -> RigidBodyFlags
[src]
Get the rigid body flags.
pub fn set_min_ccd_advance_coefficient(&mut self, advance_coefficient: f32)
[src]
Set the CCD advance coefficient, clamped to range [0.0 ..= 1.0]. Default is 0.15. Values near 1.0 ensures that some will be advanced, but objects may slowly drift through eachother. Values near 0.0 will never drift through eachother, but may "jam" ie. not advance through time during a given CCD pass.
pub fn get_min_ccd_advance_coefficient(&self) -> f32
[src]
Get the CCD advance coefficient.
pub fn set_max_depenetration_velocity(&mut self, bias_clamp: f32)
[src]
sET the maximum allowed depenetration velocity
pub fn get_max_depenetration_velocity(&self) -> f32
[src]
Get the maximum allowed depenetration velocity
pub fn set_max_contact_impulse(&mut self, max_impulse: f32)
[src]
Set the max number of contact impulses this body may experience
pub fn get_max_contact_impulse(&self) -> f32
[src]
Get the max number of contact impulses this body may experience
Implementors
impl<T> RigidBody for T where
T: Class<PxRigidBody> + RigidActor,
[src]
T: Class<PxRigidBody> + RigidActor,