pub trait RigidBody: Class<PxRigidBody> + RigidActor {
Show 35 methods fn set_mass(&mut self, mass: f32) { ... } fn get_angular_velocity(&self) -> PxVec3 { ... } fn get_linear_velocity(&self) -> PxVec3 { ... } fn get_velocities(&self) -> (PxVec3, PxVec3) { ... } fn set_c_mass_local_pose(&mut self, pose: &PxTransform) { ... } fn get_c_mass_local_pose(&self) -> PxTransform { ... } fn get_mass(&self) -> f32 { ... } fn get_inv_mass(&self) -> f32 { ... } fn set_mass_space_inertia_tensor(&mut self, m: &PxVec3) { ... } fn get_mass_space_inertia_tensor(&self) -> PxVec3 { ... } fn get_mass_space_inv_inertia_tensor(&self) -> PxVec3 { ... } fn set_linear_damping(&mut self, lin_damp: f32) { ... } fn get_linear_damping(&self) -> f32 { ... } fn set_angular_damping(&mut self, ang_damp: f32) { ... } fn get_angular_damping(&self) -> f32 { ... } fn set_linear_velocity(&mut self, lin_vel: &PxVec3, autowake: bool) { ... } fn set_angular_velocity(&mut self, ang_vel: &PxVec3, autowake: bool) { ... } fn set_max_angular_velocity(&mut self, max_ang_vel: f32) { ... } fn get_max_angular_velocity(&self) -> f32 { ... } fn set_max_linear_velocity(&mut self, max_lin_vel: f32) { ... } fn get_max_linear_velocity(&self) -> f32 { ... } fn add_force(&mut self, force: &PxVec3, mode: ForceMode, autowake: bool) { ... } fn add_torque(&mut self, torque: &PxVec3, mode: ForceMode, autowake: bool) { ... } fn clear_force(&mut self, mode: ForceMode) { ... } fn clear_torque(&mut self, mode: ForceMode) { ... } fn set_force_and_torque(
        &mut self,
        force: &PxVec3,
        torque: &PxVec3,
        mode: ForceMode
    ) { ... } fn set_rigid_body_flag(&mut self, flag: RigidBodyFlag, value: bool) { ... } fn set_rigid_body_flags(&mut self, flags: RigidBodyFlags) { ... } fn get_rigid_body_flags(&self) -> RigidBodyFlags { ... } fn set_min_ccd_advance_coefficient(&mut self, advance_coefficient: f32) { ... } fn get_min_ccd_advance_coefficient(&self) -> f32 { ... } fn set_max_depenetration_velocity(&mut self, bias_clamp: f32) { ... } fn get_max_depenetration_velocity(&self) -> f32 { ... } fn set_max_contact_impulse(&mut self, max_impulse: f32) { ... } fn get_max_contact_impulse(&self) -> f32 { ... }
}

Provided Methods

Set the mass of this body

Get the angular velocity.

Get the linear velocity.

Get the (linear, angular) velocities.

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.

Get the pose of the center of mass.

Get the mass of the body.

Get the inverse of the mass of this body.

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 PxArticulationLinks.

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.

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.

Sets the linear damping. Zero represents no damping. Values clamped to [0.0 .. ].

Gets the linear damping.

Sets the angular damping. Zero represents no damping. Values clamped to (0.0, .. ).

Get the angular damping.

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.

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.

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).

Get the maximum angular velocity.

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).

Get the maximum linear velocity.

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.

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.

Clear the accumulated acceleration or velocity change. ForceMode::Acceleration and ForceMode::Force clear the same accumulator, as do ForceMode::VelocityChange and ForceMode::Impulse.

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.

Set the force and torque accumulators.

Set a rigid body flag.

Set all the rigid body flags.

Get the rigid body flags.

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.

Get the CCD advance coefficient.

sET the maximum allowed depenetration velocity

Get the maximum allowed depenetration velocity

Set the max number of contact impulses this body may experience

Get the max number of contact impulses this body may experience

Implementors