RavEngine
Loading...
Searching...
No Matches
physx::PxsCCDContext Class Reference

CCD context object. More...

#include <PxsCCD.h>

Inheritance diagram for physx::PxsCCDContext:
[legend]
Collaboration diagram for physx::PxsCCDContext:
[legend]

Public Member Functions

 PxsCCDContext (PxsContext *context, Dy::ThresholdStream &thresholdStream, PxvNphaseImplementationContext &nPhaseContext, PxReal ccdThreshold)
 Constructor for PxsCCDContext.
 
 ~PxsCCDContext ()
 Destructor for PxsCCDContext.
 
PX_FORCE_INLINE PxCCDContactModifyCallback * getCCDContactModifyCallback () const
 Returns the CCD contact modification callback.
 
PX_FORCE_INLINE void setCCDContactModifyCallback (PxCCDContactModifyCallback *c)
 Sets the CCD contact modification callback.
 
PX_FORCE_INLINE PxU32 getCCDMaxPasses () const
 Returns the maximum number of CCD passes.
 
PX_FORCE_INLINE void setCCDMaxPasses (PxU32 ccdMaxPasses)
 Sets the maximum number of CCD passes.
 
PX_FORCE_INLINE PxU32 getCurrentCCDPass () const
 Returns the current CCD pass.
 
PX_FORCE_INLINE PxI32 getNumSweepHits () const
 Returns The number of swept hits reported.
 
PX_FORCE_INLINE PxU32 getNumUpdatedBodies () const
 Returns The number of updated bodies.
 
PX_FORCE_INLINE PxsRigidBody *const * getUpdatedBodies () const
 Returns The update bodies array.
 
PX_FORCE_INLINE void clearUpdatedBodies ()
 Returns Clears the updated bodies array.
 
PX_FORCE_INLINE PxReal getCCDThreshold () const
 
PX_FORCE_INLINE void setCCDThreshold (PxReal t)
 
void runCCDModifiableContact (PxModifiableContact *PX_RESTRICT contacts, PxU32 contactCount, const PxsShapeCore *PX_RESTRICT shapeCore0, const PxsShapeCore *PX_RESTRICT shapeCore1, const PxsRigidCore *PX_RESTRICT rigidCore0, const PxsRigidCore *PX_RESTRICT rigidCore1, const PxsRigidBody *PX_RESTRICT rigid0, const PxsRigidBody *PX_RESTRICT rigid1)
 Runs the CCD contact modification.
 
void updateCCD (PxReal dt, PxBaseTask *continuation, IG::IslandSim &islandSim, bool disableResweep, PxI32 numFastMovingShapes)
 Performs a single CCD update This occurs after broad phase and is responsible for creating islands, finding the TOI of collisions, filtering contacts, issuing modification callbacks and responding to collisions. At the end of this phase all bodies will have stepper to their first TOI if they were involved in a CCD collision this frame.
 
void updateCCDBegin ()
 Signals the beginning of a CCD multi-pass update.
 
void resetContactManagers ()
 Resets the CCD contact state in any contact managers that previously had a reported CCD touch. This must be called if CCD update is bypassed for a frame.
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Detailed Description

CCD context object.

Constructor & Destructor Documentation

◆ PxsCCDContext()

PxsCCDContext::PxsCCDContext ( PxsContext *  context,
Dy::ThresholdStream &  thresholdStream,
PxvNphaseImplementationContext &  nPhaseContext,
PxReal  ccdThreshold 
)

Constructor for PxsCCDContext.

Parameters
[in]contextThe PxsContext that is associated with this PxsCCDContext.

Member Function Documentation

◆ getCCDContactModifyCallback()

PX_FORCE_INLINE PxCCDContactModifyCallback * physx::PxsCCDContext::getCCDContactModifyCallback ( ) const
inline

Returns the CCD contact modification callback.

Returns
The CCD contact modification callback

◆ getCCDMaxPasses()

PX_FORCE_INLINE PxU32 physx::PxsCCDContext::getCCDMaxPasses ( ) const
inline

Returns the maximum number of CCD passes.

Returns
The maximum number of CCD passes

◆ getCurrentCCDPass()

PX_FORCE_INLINE PxU32 physx::PxsCCDContext::getCurrentCCDPass ( ) const
inline

Returns the current CCD pass.

Returns
The current CCD pass

◆ getNumSweepHits()

PX_FORCE_INLINE PxI32 physx::PxsCCDContext::getNumSweepHits ( ) const
inline

Returns The number of swept hits reported.

Returns
The number of swept hits reported

◆ getNumUpdatedBodies()

PX_FORCE_INLINE PxU32 physx::PxsCCDContext::getNumUpdatedBodies ( ) const
inline

Returns The number of updated bodies.

Returns
The number of updated bodies in this CCD pass

◆ getUpdatedBodies()

PX_FORCE_INLINE PxsRigidBody *const * physx::PxsCCDContext::getUpdatedBodies ( ) const
inline

Returns The update bodies array.

Returns
The updated bodies array from this CCD pass

◆ runCCDModifiableContact()

void PxsCCDContext::runCCDModifiableContact ( PxModifiableContact *PX_RESTRICT  contacts,
PxU32  contactCount,
const PxsShapeCore *PX_RESTRICT  shapeCore0,
const PxsShapeCore *PX_RESTRICT  shapeCore1,
const PxsRigidCore *PX_RESTRICT  rigidCore0,
const PxsRigidCore *PX_RESTRICT  rigidCore1,
const PxsRigidBody *PX_RESTRICT  rigid0,
const PxsRigidBody *PX_RESTRICT  rigid1 
)

Runs the CCD contact modification.

Parameters
[in]contactsThe list of modifiable contacts
[in]contactCountThe number of contacts
[in]shapeCore0The first shape core
[in]shapeCore1The second shape core
[in]rigidCore0The first rigid core
[in]rigidCore1The second rigid core
[in]rigid0The first rigid body
[in]rigid1The second rigid body

◆ setCCDContactModifyCallback()

PX_FORCE_INLINE void physx::PxsCCDContext::setCCDContactModifyCallback ( PxCCDContactModifyCallback *  c)
inline

Sets the CCD contact modification callback.

Parameters
[in]cThe CCD contact modification callback

◆ setCCDMaxPasses()

PX_FORCE_INLINE void physx::PxsCCDContext::setCCDMaxPasses ( PxU32  ccdMaxPasses)
inline

Sets the maximum number of CCD passes.

Parameters
[in]ccdMaxPassesThe maximum number of CCD passes

◆ updateCCD()

void PxsCCDContext::updateCCD ( PxReal  dt,
PxBaseTask *  continuation,
IG::IslandSim &  islandSim,
bool  disableResweep,
PxI32  numFastMovingShapes 
)

Performs a single CCD update This occurs after broad phase and is responsible for creating islands, finding the TOI of collisions, filtering contacts, issuing modification callbacks and responding to collisions. At the end of this phase all bodies will have stepper to their first TOI if they were involved in a CCD collision this frame.

Parameters
[in]dtThe timestep to simulate
[in]continuationThe continuation task
[in]islandSimThe island manager
[in]disableResweepIf this is true, we perform a reduced-fidelity CCD approach

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