pub trait RigidDynamic: Class<PxRigidDynamic> + RigidBody + UserData {
Show 22 methods fn new(
        physics: &mut impl Physics,
        transform: PxTransform,
        geometry: &impl Geometry,
        material: &mut <Self::Shape as Shape>::Material,
        density: f32,
        shape_transform: PxTransform,
        user_data: Self::UserData
    ) -> Option<Owner<Self>> { ... } unsafe fn from_raw(
        ptr: *mut PxRigidDynamic,
        user_data: Self::UserData
    ) -> Option<Owner<Self>> { ... } fn get_user_data(&self) -> &Self::UserData { ... } fn get_user_data_mut(&mut self) -> &mut Self::UserData { ... } fn get_contact_report_threshold(&self) -> f32 { ... } fn get_kinematic_target(&self) -> Option<PxTransform> { ... } fn get_rigid_dynamic_lock_flags(&self) -> RigidDynamicLockFlags { ... } fn get_sleep_threshold(&self) -> f32 { ... } fn get_solver_iteration_counts(&self) -> (u32, u32) { ... } fn get_stabilization_threshold(&self) -> f32 { ... } fn get_wake_counter(&self) -> f32 { ... } fn is_sleeping(&self) -> bool { ... } fn put_to_sleep(&mut self) { ... } fn set_contact_report_threshold(&mut self, threshold: f32) { ... } fn set_kinematic_target(&mut self, target: &PxTransform) { ... } fn set_rigid_dynamic_lock_flag(
        &mut self,
        flag: RigidDynamicLockFlag,
        value: bool
    ) { ... } fn set_rigid_dynamic_lock_flags(&mut self, flags: RigidDynamicLockFlags) { ... } fn set_sleep_threshold(&mut self, threshold: f32) { ... } fn set_solver_iteration_counts(
        &mut self,
        min_position_iterations: u32,
        min_velocity_iterations: u32
    ) { ... } fn set_stabilization_threshold(&mut self, threshold: f32) { ... } fn set_wake_counter(&mut self, wake_counter: f32) { ... } fn wake_up(&mut self) { ... }
}

Provided Methods

Create a new RigidDynamic.

Create a new Owner wrapper around a raw pointer.

Safety

Owner’s own the pointer they wrap, using the pointer after dropping the Owner, or creating multiple Owners from the same pointer will cause UB. Use into_ptr to retrieve the pointer and consume the Owner without dropping the pointee. Initializes user data.

Get the user data.

Get the user data.

Get the contact report threshold. If the force between two actors exceeds this threshold for either actor, a contact report will be generated in accordance with the filter shader.

Returns a copy of the target transform if the actor is knematically controlled and has a target set, otherwise it returns None.

Get the lock flags.

Get the sleep threshold. If the actor’s mass-normalized kinetic energy is below this value, the actor might go to sleep.

Get the number of (position, velocity) iterations done by the solver.

Get the stabilization threshold. Actors with mass-normalized kinetic energy may participate in stabilization.

Get the wake counter.

Returns true if the actor is sleeping. Sleeping actors are not simulated. If an actor is sleeping, it’s linear and angular velocities are zero, no force or torque updates are pending, and the wake counter is zero.

Put the actor to sleep. Pending force and torque is cleared, and the wake counter and linear and angular velocities are all set to zero.

Set the contact report threshold, used when determining if a contact report should be generated.

Set the kinematic target of the actor. Set an actor as kinematic using RigidBodyFlag::Kinematic. The actor will have it’s velocity set such that it gets moved to the desired pose in a single timestep, then the velocity will be zeroed. Movement along a path requires continuous calls. Consecutive calls in a single frame will overwrite the prior.

Set a lock flag, preventing movement along or about an axis.

Set the lock flags.

Set the mass normalized kinetic energy under which an actor is a candidate for being slept. Default is 5e-5f * PxTolerancesScale.speed ^ 2. Value is clamped to range [0.0 .. ].

Set the number of solver iterations for the position and velocity solvers clamped to range [1..=255]. Defualt is position = 4 and velocity = 1. If bodies are oscillating, increase the position iterations. If bodies are being depenetrated too quickly, increase the velocity iterations.

Set the stabilization threshold. Actors with mass-normalized kinetic energy above this value will not participate in stabilization.

Sets the wake counter. This is the minimum amount of time until an actor must spend below the sleep threshold before it is put to sleep. Setting this to a positive value will wake the actor. Default is 0.4, value is in seconds.

Wake the actor. May wake touching actors. Sets the wake counter to the wake_counter_reset_value set at scene creation.

Implementors