#[repr(i32)]
pub enum PxPairFlag {
Show 18 variants SolveContact = 1, ModifyContacts = 2, NotifyTouchFound = 4, NotifyTouchPersists = 8, NotifyTouchLost = 16, NotifyTouchCcd = 32, NotifyThresholdForceFound = 64, NotifyThresholdForcePersists = 128, NotifyThresholdForceLost = 256, NotifyContactPoints = 512, DetectDiscreteContact = 1_024, DetectCcdContact = 2_048, PreSolverVelocity = 4_096, PostSolverVelocity = 8_192, ContactEventPose = 16_384, NextFree = 32_768, ContactDefault = 1_025, TriggerDefault = 1_044,
}
Expand description

Collection of flags describing the actions to take for a collision pair.

Variants§

§

SolveContact = 1

Process the contacts of this collision pair in the dynamics solver.

Only takes effect if the colliding actors are rigid bodies.

§

ModifyContacts = 2

Call contact modification callback for this collision pair

Only takes effect if the colliding actors are rigid bodies.

§

NotifyTouchFound = 4

Call contact report callback or trigger callback when this collision pair starts to be in contact.

If one of the two collision objects is a trigger shape (see [PxShapeFlag::eTRIGGER_SHAPE]) then the trigger callback will get called as soon as the other object enters the trigger volume. If none of the two collision objects is a trigger shape then the contact report callback will get called when the actors of this collision pair start to be in contact.

Only takes effect if the colliding actors are rigid bodies.

Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

§

NotifyTouchPersists = 8

Call contact report callback while this collision pair is in contact

If none of the two collision objects is a trigger shape then the contact report callback will get called while the actors of this collision pair are in contact.

Triggers do not support this event. Persistent trigger contacts need to be tracked separately by observing eNOTIFY_TOUCH_FOUND/eNOTIFY_TOUCH_LOST events.

Only takes effect if the colliding actors are rigid bodies.

No report will get sent if the objects in contact are sleeping.

Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

If this flag gets enabled while a pair is in touch already, there will be no eNOTIFY_TOUCH_PERSISTS events until the pair loses and regains touch.

§

NotifyTouchLost = 16

Call contact report callback or trigger callback when this collision pair stops to be in contact

If one of the two collision objects is a trigger shape (see [PxShapeFlag::eTRIGGER_SHAPE]) then the trigger callback will get called as soon as the other object leaves the trigger volume. If none of the two collision objects is a trigger shape then the contact report callback will get called when the actors of this collision pair stop to be in contact.

Only takes effect if the colliding actors are rigid bodies.

This event will also get triggered if one of the colliding objects gets deleted.

Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

§

NotifyTouchCcd = 32

Call contact report callback when this collision pair is in contact during CCD passes.

If CCD with multiple passes is enabled, then a fast moving object might bounce on and off the same object multiple times. Hence, the same pair might be in contact multiple times during a simulation step. This flag will make sure that all the detected collision during CCD will get reported. For performance reasons, the system can not always tell whether the contact pair lost touch in one of the previous CCD passes and thus can also not always tell whether the contact is new or has persisted. eNOTIFY_TOUCH_CCD just reports when the two collision objects were detected as being in contact during a CCD pass.

Only takes effect if the colliding actors are rigid bodies.

Trigger shapes are not supported.

Only takes effect if eDETECT_CCD_CONTACT is raised

§

NotifyThresholdForceFound = 64

Call contact report callback when the contact force between the actors of this collision pair exceeds one of the actor-defined force thresholds.

Only takes effect if the colliding actors are rigid bodies.

Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

§

NotifyThresholdForcePersists = 128

Call contact report callback when the contact force between the actors of this collision pair continues to exceed one of the actor-defined force thresholds.

Only takes effect if the colliding actors are rigid bodies.

If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the previous one (unless [eNOTIFY_THRESHOLD_FORCE_FOUND] has been set in the previous frame).

Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

§

NotifyThresholdForceLost = 256

Call contact report callback when the contact force between the actors of this collision pair falls below one of the actor-defined force thresholds (includes the case where this collision pair stops being in contact).

Only takes effect if the colliding actors are rigid bodies.

If a pair gets re-filtered and this flag has previously been disabled, then the report will not get fired in the same frame even if the force threshold has been reached in the previous one (unless [eNOTIFY_THRESHOLD_FORCE_FOUND] or #eNOTIFY_THRESHOLD_FORCE_PERSISTS has been set in the previous frame).

Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

§

NotifyContactPoints = 512

Provide contact points in contact reports for this collision pair.

Only takes effect if the colliding actors are rigid bodies and if used in combination with the flags eNOTIFY_TOUCH_… or eNOTIFY_THRESHOLD_FORCE_…

Only takes effect if eDETECT_DISCRETE_CONTACT or eDETECT_CCD_CONTACT is raised

§

DetectDiscreteContact = 1_024

This flag is used to indicate whether this pair generates discrete collision detection contacts.

Contacts are only responded to if eSOLVE_CONTACT is enabled.

§

DetectCcdContact = 2_048

This flag is used to indicate whether this pair generates CCD contacts.

The contacts will only be responded to if eSOLVE_CONTACT is enabled on this pair.

The scene must have PxSceneFlag::eENABLE_CCD enabled to use this feature.

Non-static bodies of the pair should have PxRigidBodyFlag::eENABLE_CCD specified for this feature to work correctly.

This flag is not supported with trigger shapes. However, CCD trigger events can be emulated using non-trigger shapes and requesting eNOTIFY_TOUCH_FOUND and eNOTIFY_TOUCH_LOST and not raising eSOLVE_CONTACT on the pair.

§

PreSolverVelocity = 4_096

Provide pre solver velocities in contact reports for this collision pair.

If the collision pair has contact reports enabled, the velocities of the rigid bodies before contacts have been solved will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.

Usually it is not necessary to request these velocities as they will be available by querying the velocity from the provided PxRigidActor object directly. However, it might be the case that the velocity of a rigid body gets set while the simulation is running in which case the PxRigidActor would return this new velocity in the contact report callback and not the velocity the simulation used.

§

PostSolverVelocity = 8_192

Provide post solver velocities in contact reports for this collision pair.

If the collision pair has contact reports enabled, the velocities of the rigid bodies after contacts have been solved will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.

§

ContactEventPose = 16_384

Provide rigid body poses in contact reports for this collision pair.

If the collision pair has contact reports enabled, the rigid body poses at the contact event will be provided in the contact report callback unless the pair lost touch in which case no data will be provided.

Usually it is not necessary to request these poses as they will be available by querying the pose from the provided PxRigidActor object directly. However, it might be the case that the pose of a rigid body gets set while the simulation is running in which case the PxRigidActor would return this new pose in the contact report callback and not the pose the simulation used. Another use case is related to CCD with multiple passes enabled, A fast moving object might bounce on and off the same object multiple times. This flag can be used to request the rigid body poses at the time of impact for each such collision event.

§

NextFree = 32_768

For internal use only.

§

ContactDefault = 1_025

Provided default flag to do simple contact processing for this collision pair.

§

TriggerDefault = 1_044

Provided default flag to get commonly used trigger behavior for this collision pair.

Trait Implementations§

source§

impl Clone for PxPairFlag

source§

fn clone(&self) -> PxPairFlag

Returns a copy 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 PxPairFlag

source§

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

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

impl PartialEq for PxPairFlag

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for PxPairFlag

source§

impl Eq for PxPairFlag

source§

impl StructuralEq for PxPairFlag

source§

impl StructuralPartialEq for PxPairFlag

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> 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,

§

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>,

§

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>,

§

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.