Trait physx::rigid_body::RigidBody[][src]

pub trait RigidBody: Class<PxRigidBody> + RigidActor {
    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

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

Set the mass of this body

fn get_angular_velocity(&self) -> PxVec3[src]

Get the angular velocity.

fn get_linear_velocity(&self) -> PxVec3[src]

Get the linear velocity.

fn get_velocities(&self) -> (PxVec3, PxVec3)[src]

Get the (linear, angular) velocities.

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.

fn get_c_mass_local_pose(&self) -> PxTransform[src]

Get the pose of the center of mass.

fn get_mass(&self) -> f32[src]

Get the mass of the body.

fn get_inv_mass(&self) -> f32[src]

Get the inverse of the mass of this body.

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

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.

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.

fn set_linear_damping(&mut self, lin_damp: f32)[src]

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

fn get_linear_damping(&self) -> f32[src]

Gets the linear damping.

fn set_angular_damping(&mut self, ang_damp: f32)[src]

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

fn get_angular_damping(&self) -> f32[src]

Get the angular damping.

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.

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.

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

fn get_max_angular_velocity(&self) -> f32[src]

Get the maximum angular velocity.

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

fn get_max_linear_velocity(&self) -> f32[src]

Get the maximum linear velocity.

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.

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.

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.

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.

fn set_force_and_torque(
    &mut self,
    force: &PxVec3,
    torque: &PxVec3,
    mode: ForceMode
)
[src]

Set the force and torque accumulators.

fn set_rigid_body_flag(&mut self, flag: RigidBodyFlag, value: bool)[src]

Set a rigid body flag.

fn set_rigid_body_flags(&mut self, flags: RigidBodyFlags)[src]

Set all the rigid body flags.

fn get_rigid_body_flags(&self) -> RigidBodyFlags[src]

Get the rigid body flags.

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.

fn get_min_ccd_advance_coefficient(&self) -> f32[src]

Get the CCD advance coefficient.

fn set_max_depenetration_velocity(&mut self, bias_clamp: f32)[src]

sET the maximum allowed depenetration velocity

fn get_max_depenetration_velocity(&self) -> f32[src]

Get the maximum allowed depenetration velocity

fn set_max_contact_impulse(&mut self, max_impulse: f32)[src]

Set the max number of contact impulses this body may experience

fn get_max_contact_impulse(&self) -> f32[src]

Get the max number of contact impulses this body may experience

Loading content...

Implementors

impl<T> RigidBody for T where
    T: Class<PxRigidBody> + RigidActor
[src]

Loading content...