PxRigidBodyFlag

Enum PxRigidBodyFlag 

Source
#[repr(i32)]
pub enum PxRigidBodyFlag { Kinematic = 1, UseKinematicTargetForSceneQueries = 2, EnableCcd = 4, EnableCcdFriction = 8, EnableSpeculativeCcd = 16, EnablePoseIntegrationPreview = 32, EnableCcdMaxContactImpulse = 64, RetainAccelerations = 128, ForceKineKineNotifications = 256, ForceStaticKineNotifications = 512, EnableGyroscopicForces = 1_024, }
Expand description

Collection of flags describing the behavior of a rigid body.

Variants§

§

Kinematic = 1

Enable kinematic mode for the body.

§

UseKinematicTargetForSceneQueries = 2

Use the kinematic target transform for scene queries.

If this flag is raised, then scene queries will treat the kinematic target transform as the current pose of the body (instead of using the actual pose). Without this flag, the kinematic target will only take effect with respect to scene queries after a simulation step.

§

EnableCcd = 4

Enable CCD for the body.

§

EnableCcdFriction = 8

Enabled CCD in swept integration for the actor.

If this flag is raised and CCD is enabled, CCD interactions will simulate friction. By default, friction is disabled in CCD interactions because CCD friction has been observed to introduce some simulation artifacts. CCD friction was enabled in previous versions of the SDK. Raising this flag will result in behavior that is a closer match for previous versions of the SDK.

This flag requires PxRigidBodyFlag::eENABLE_CCD to be raised to have any effect.

§

EnableSpeculativeCcd = 16

Register a rigid body to dynamically adjust contact offset based on velocity. This can be used to achieve a CCD effect.

If both eENABLE_CCD and eENABLE_SPECULATIVE_CCD are set on the same body, then angular motions are handled by speculative contacts (eENABLE_SPECULATIVE_CCD) while linear motions are handled by sweeps (eENABLE_CCD).

§

EnablePoseIntegrationPreview = 32

Register a rigid body for reporting pose changes by the simulation at an early stage.

Sometimes it might be advantageous to get access to the new pose of a rigid body as early as possible and not wait until the call to fetchResults() returns. Setting this flag will schedule the rigid body to get reported in PxSimulationEventCallback::onAdvance. Please refer to the documentation of that callback to understand the behavior and limitations of this functionality.

§

EnableCcdMaxContactImpulse = 64

Permit CCD to limit maxContactImpulse. This is useful for use-cases like a destruction system but can cause visual artefacts so is not enabled by default.

§

RetainAccelerations = 128

Carries over forces/accelerations between frames, rather than clearing them

§

ForceKineKineNotifications = 256

Forces kinematic-kinematic pairs notifications for this actor.

This flag overrides the global scene-level PxPairFilteringMode setting for kinematic actors. This is equivalent to having PxPairFilteringMode::eKEEP for pairs involving this actor.

A particular use case is when you have a large amount of kinematic actors, but you are only interested in interactions between a few of them. In this case it is best to use PxSceneDesc.kineKineFilteringMode = PxPairFilteringMode::eKILL, and then raise the eFORCE_KINE_KINE_NOTIFICATIONS flag on the small set of kinematic actors that need notifications.

This has no effect if PxRigidBodyFlag::eKINEMATIC is not set.

Changing this flag at runtime will not have an effect until you remove and re-add the actor to the scene.

§

ForceStaticKineNotifications = 512

Forces static-kinematic pairs notifications for this actor.

Similar to eFORCE_KINE_KINE_NOTIFICATIONS, but for static-kinematic interactions.

This has no effect if PxRigidBodyFlag::eKINEMATIC is not set.

Changing this flag at runtime will not have an effect until you remove and re-add the actor to the scene.

§

EnableGyroscopicForces = 1_024

Enables computation of gyroscopic forces on the rigid body.

Trait Implementations§

Source§

impl Clone for PxRigidBodyFlag

Source§

fn clone(&self) -> PxRigidBodyFlag

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PxRigidBodyFlag

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PxRigidBodyFlag

Source§

fn eq(&self, other: &PxRigidBodyFlag) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for PxRigidBodyFlag

Source§

impl Eq for PxRigidBodyFlag

Source§

impl StructuralPartialEq for PxRigidBodyFlag

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.