RavEngine
Loading...
Searching...
No Matches
physx::PxsCCDPair Struct Reference

A structure to represent a potential CCD interaction between a pair of shapes. More...

#include <PxsCCD.h>

Collaboration diagram for physx::PxsCCDPair:
[legend]

Public Types

enum  E_TOIType { eEstimate , ePrecise }
 Defines whether this is an estimated TOI or an accurate TOI. More...
 

Public Member Functions

PxReal sweepFindToi (PxcNpThreadContext &threadContext, PxReal dt, PxU32 pass, PxReal ccdThreshold)
 Perform a precise sweep for this pair.
 
PxReal sweepEstimateToi (PxReal ccdThreshold)
 Performs a sweep estimation for this pair.
 
bool sweepAdvanceToToi (PxReal dt, bool clipTrajectoryToToi)
 Advances this pair to the TOI.
 
void updateShapes ()
 Updates the transforms of the shapes involved in this pair.
 

Public Attributes

PxsRigidBody * mBa0
 
PxsRigidBody * mBa1
 
PxsCCDShape * mCCDShape0
 
PxsCCDShape * mCCDShape1
 
PxVec3 mMinToiNormal
 
PxReal mMinToi
 
PxReal mPenetrationPostStep
 
PxVec3 mMinToiPoint
 
PxReal mPenetration
 
PxsContactManager * mCm
 
PxU32 mIslandId
 
PxGeometryType::Enum mG0
 
PxGeometryType::Enum mG1
 
bool mIsEarliestToiHit
 
bool mIsModifiable
 
PxU32 mFaceIndex
 
PxU16 mMaterialIndex0
 
PxU16 mMaterialIndex1
 
PxReal mDynamicFriction
 
PxReal mStaticFriction
 
PxReal mRestitution
 
PxU32 mEstimatePass
 
PxReal mAppliedForce
 
PxReal mMaxImpulse
 
E_TOIType mToiType
 
bool mHasFriction
 

Detailed Description

A structure to represent a potential CCD interaction between a pair of shapes.

Member Enumeration Documentation

◆ E_TOIType

Defines whether this is an estimated TOI or an accurate TOI.

We store pairs in a priority queue based on the TOIs. We use cheap estimates to cull away work and lazily evaluate TOIs. This means that an element in the priority queue may either be an estimate or a precise result.

Member Function Documentation

◆ sweepAdvanceToToi()

bool PxsCCDPair::sweepAdvanceToToi ( PxReal  dt,
bool  clipTrajectoryToToi 
)

Advances this pair to the TOI.

Parameters
[in]dtThe time-step
[in]clipTrajectoryToToiIndicates whether we clip the body's trajectory to the end pose. Only done in the final pass
Returns
Whether the advance was successful. An advance will be unsuccessful if body bodies were already updated.

◆ sweepEstimateToi()

PxReal PxsCCDPair::sweepEstimateToi ( PxReal  ccdThreshold)

Performs a sweep estimation for this pair.

Returns
The normalized TOI. <= 1.0 indicates a potential hit, otherwise PX_MAX_REAL.

◆ sweepFindToi()

PxReal PxsCCDPair::sweepFindToi ( PxcNpThreadContext &  threadContext,
PxReal  dt,
PxU32  pass,
PxReal  ccdThreshold 
)

Perform a precise sweep for this pair.

Parameters
[in]threadContextThe per-thread context
[in]dtThe time-step
[in]passThe current CCD pass
Returns
The normalized TOI. <=1.0 indicates a hit. Otherwise PX_MAX_REAL.

The documentation for this struct was generated from the following files: