RavEngine
Loading...
Searching...
No Matches
physx::Dy::Context Class Referenceabstract
Inheritance diagram for physx::Dy::Context:
[legend]
Collaboration diagram for physx::Dy::Context:
[legend]

Public Member Functions

PX_FORCE_INLINE PxReal getMaxBiasCoefficient () const
 
PX_FORCE_INLINE void setMaxBiasCoefficient (PxReal coeff)
 
PX_FORCE_INLINE PxReal getBounceThreshold () const
 Returns the bounce threshold.
 
PX_FORCE_INLINE PxReal getFrictionOffsetThreshold () const
 Returns the friction offset threshold.
 
PX_FORCE_INLINE PxReal getCorrelationDistance () const
 Returns the correlation distance.
 
PX_FORCE_INLINE PxReal getCCDSeparationThreshold () const
 Returns the CCD separation threshold.
 
PX_FORCE_INLINE PxReal getLengthScale () const
 Returns the length scale.
 
PX_FORCE_INLINE void setBounceThreshold (PxReal f)
 Sets the bounce threshold.
 
PX_FORCE_INLINE void setCorrelationDistance (PxReal f)
 Sets the correlation distance.
 
PX_FORCE_INLINE void setFrictionOffsetThreshold (PxReal offset)
 Sets the friction offset threshold.
 
PX_FORCE_INLINE void setCCDSeparationThreshold (PxReal offset)
 Sets the friction offset threshold.
 
PX_FORCE_INLINE PxU32 getSolverBatchSize () const
 Returns the solver batch size.
 
PX_FORCE_INLINE void setSolverBatchSize (PxU32 f)
 Sets the solver batch size.
 
PX_FORCE_INLINE PxU32 getSolverArticBatchSize () const
 Returns the solver batch size.
 
PX_FORCE_INLINE void setSolverArticBatchSize (PxU32 f)
 Sets the solver batch size.
 
PX_FORCE_INLINE PxU32 getMaxSolverConstraintSize () const
 Returns the maximum solver constraint size.
 
PX_FORCE_INLINE PxFrictionType::Enum getFrictionType () const
 Returns the friction model being used.
 
PX_FORCE_INLINE ThresholdStream & getThresholdStream ()
 Returns the threshold stream.
 
PX_FORCE_INLINE ThresholdStream & getForceChangedThresholdStream ()
 
PX_FORCE_INLINE ThresholdTable & getThresholdTable ()
 Returns the threshold table.
 
PX_FORCE_INLINE void setFrictionType (PxFrictionType::Enum f)
 Sets the friction model to be used.
 
virtual void destroy ()=0
 Destroys this dynamics context.
 
PX_FORCE_INLINE PxcDataStreamPool & getContactStreamPool ()
 
PX_FORCE_INLINE PxcDataStreamPool & getPatchStreamPool ()
 
PX_FORCE_INLINE PxcDataStreamPool & getForceStreamPool ()
 
PX_FORCE_INLINE PxPinnedArray< Dy::ConstraintWriteback > & getConstraintWriteBackPool ()
 
PX_FORCE_INLINE PxReal getDt () const
 Returns the current frame's timestep.
 
PX_FORCE_INLINE PxReal getInvDt () const
 Returns 1/(current frame's timestep)
 
PX_FORCE_INLINE PxVec3 getGravity () const
 
virtual void update (IG::SimpleIslandManager &simpleIslandManager, PxBaseTask *continuation, PxBaseTask *processLostTouchTask, PxvNphaseImplementationContext *nPhaseContext, const PxU32 maxPatchesPerCM, const PxU32 maxArticulationLinks, const PxReal dt, const PxVec3 &gravity, PxBitMapPinned &changedHandleMap)=0
 The entry point for the constraint solver.
 
virtual void processLostPatches (IG::SimpleIslandManager &simpleIslandManager, PxsContactManager **lostPatchManagers, PxU32 nbLostPatchManagers, PxsContactManagerOutputCounts *outCounts)=0
 
virtual void processFoundPatches (IG::SimpleIslandManager &simpleIslandManager, PxsContactManager **foundPatchManagers, PxU32 nbFoundPatchManagers, PxsContactManagerOutputCounts *outCounts)=0
 
virtual void updateBodyCore (PxBaseTask *continuation)=0
 This method copy gpu solver body data to cpu body core.
 
virtual void mergeResults ()=0
 Called after update's task chain has completed. This collects the results of the solver together.
 
virtual void setSimulationController (PxsSimulationController *simulationController)=0
 
virtual void getDataStreamBase (void *&contactStreamBase, void *&patchStreamBase, void *&forceAndIndiceStreamBase)=0
 
virtual PxSolverType::Enum getSolverType () const =0
 
void createThresholdStream (PxVirtualAllocatorCallback &callback)
 
void createForceChangeThresholdStream (PxVirtualAllocatorCallback &callback)
 
void setStateDirty (bool dirty)
 
bool isStateDirty ()
 
void setSuppressReadback (bool suppressReadback)
 
bool getSuppressReadback ()
 
void setDt (const PxReal dt)
 

Protected Member Functions

 Context (IG::SimpleIslandManager *islandManager, PxVirtualAllocatorCallback *allocatorCallback, PxvSimStats &simStats, bool enableStabilization, bool useEnhancedDeterminism, const PxReal maxBiasCoefficient, const PxReal lengthScale)
 

Protected Attributes

ThresholdStream * mThresholdStream
 
ThresholdStream * mForceChangedThresholdStream
 
ThresholdTable mThresholdTable
 
IG::SimpleIslandManager * mIslandManager
 
PxsSimulationController * mSimulationController
 
PxReal mDt
 Time-step.
 
PxReal mInvDt
 1/time-step.
 
PxReal mMaxBiasCoefficient
 
const bool mEnableStabilization
 
const bool mUseEnhancedDeterminism
 
PxVec3 mGravity
 
PxU32 mMaxSolverConstraintSize
 max solver constraint size
 
PxReal mBounceThreshold
 Threshold controlling the relative velocity at which the solver transitions between restitution and bias for solving normal contact constraint.
 
PxReal mFrictionOffsetThreshold
 Threshold controlling whether friction anchors are constructed or not. If the separation is above mFrictionOffsetThreshold, the contact will not be considered to become a friction anchor.
 
PxReal mCCDSeparationThreshold
 Threshold controlling whether distant contacts are processed using bias, restitution or a combination of the two. This only has effect on pairs involving bodies that have enabled speculative CCD simulation mode.
 
PxReal mCorrelationDistance
 Threshold for controlling friction correlation.
 
PxReal mLengthScale
 The length scale from PxTolerancesScale::length.
 
PxU32 mSolverBatchSize
 The minimum size of an island to generate a solver task chain.
 
PxU32 mSolverArticBatchSize
 The minimum number of articulations required to generate a solver task chain.
 
PxFrictionType::Enum mFrictionType
 The current friction model being used.
 
PxcDataStreamPool mContactStreamPool
 Structure to encapsulate contact stream allocations. Used by GPU solver to reference pre-allocated pinned host memory.
 
PxcDataStreamPool mPatchStreamPool
 Struct to encapsulate the contact patch stream allocations. Used by GPU solver to reference pre-allocated pinned host memory.
 
PxcDataStreamPool mForceStreamPool
 Structure to encapsulate force stream allocations. Used by GPU solver to reference pre-allocated pinned host memory for force reports.
 
PxPinnedArray< Dy::ConstraintWriteback > mConstraintWriteBackPool
 Structure to encapsulate constraint write back allocations. Used by GPU/CPU solver to reference pre-allocated pinned host memory for breakable joint reports.
 
PxvSimStats & mSimStats
 
bool mBodyStateDirty
 
bool mSuppressReadback
 

Member Function Documentation

◆ destroy()

virtual void physx::Dy::Context::destroy ( )
pure virtual

Destroys this dynamics context.

Implemented in physx::Dy::DynamicsContext, and physx::Dy::DynamicsTGSContext.

◆ getBounceThreshold()

PX_FORCE_INLINE PxReal physx::Dy::Context::getBounceThreshold ( ) const
inline

Returns the bounce threshold.

Returns
The bounce threshold.

◆ getCCDSeparationThreshold()

PX_FORCE_INLINE PxReal physx::Dy::Context::getCCDSeparationThreshold ( ) const
inline

Returns the CCD separation threshold.

Returns
The CCD separation threshold.

◆ getCorrelationDistance()

PX_FORCE_INLINE PxReal physx::Dy::Context::getCorrelationDistance ( ) const
inline

Returns the correlation distance.

Returns
The correlation distance.

◆ getDt()

PX_FORCE_INLINE PxReal physx::Dy::Context::getDt ( ) const
inline

Returns the current frame's timestep.

Returns
The current frame's timestep.

◆ getFrictionOffsetThreshold()

PX_FORCE_INLINE PxReal physx::Dy::Context::getFrictionOffsetThreshold ( ) const
inline

Returns the friction offset threshold.

Returns
The friction offset threshold.

◆ getFrictionType()

PX_FORCE_INLINE PxFrictionType::Enum physx::Dy::Context::getFrictionType ( ) const
inline

Returns the friction model being used.

Returns
The friction model being used.

◆ getInvDt()

PX_FORCE_INLINE PxReal physx::Dy::Context::getInvDt ( ) const
inline

Returns 1/(current frame's timestep)

Returns
1/(current frame's timestep).

◆ getLengthScale()

PX_FORCE_INLINE PxReal physx::Dy::Context::getLengthScale ( ) const
inline

Returns the length scale.

Returns
The length scale.

◆ getMaxSolverConstraintSize()

PX_FORCE_INLINE PxU32 physx::Dy::Context::getMaxSolverConstraintSize ( ) const
inline

Returns the maximum solver constraint size.

Returns
The maximum solver constraint size in this island in bytes.

◆ getSolverArticBatchSize()

PX_FORCE_INLINE PxU32 physx::Dy::Context::getSolverArticBatchSize ( ) const
inline

Returns the solver batch size.

Returns
The solver batch size.

◆ getSolverBatchSize()

PX_FORCE_INLINE PxU32 physx::Dy::Context::getSolverBatchSize ( ) const
inline

Returns the solver batch size.

Returns
The solver batch size.

◆ getThresholdStream()

PX_FORCE_INLINE ThresholdStream & physx::Dy::Context::getThresholdStream ( )
inline

Returns the threshold stream.

Returns
The threshold stream

◆ getThresholdTable()

PX_FORCE_INLINE ThresholdTable & physx::Dy::Context::getThresholdTable ( )
inline

Returns the threshold table.

Returns
The threshold table

◆ mergeResults()

virtual void physx::Dy::Context::mergeResults ( )
pure virtual

Called after update's task chain has completed. This collects the results of the solver together.

Implemented in physx::Dy::DynamicsContext, and physx::Dy::DynamicsTGSContext.

◆ setBounceThreshold()

PX_FORCE_INLINE void physx::Dy::Context::setBounceThreshold ( PxReal  f)
inline

Sets the bounce threshold.

Parameters
[in]fThe bounce threshold

◆ setCCDSeparationThreshold()

PX_FORCE_INLINE void physx::Dy::Context::setCCDSeparationThreshold ( PxReal  offset)
inline

Sets the friction offset threshold.

Parameters
[in]offsetThe friction offset threshold

◆ setCorrelationDistance()

PX_FORCE_INLINE void physx::Dy::Context::setCorrelationDistance ( PxReal  f)
inline

Sets the correlation distance.

Parameters
[in]fThe correlation distance

◆ setFrictionOffsetThreshold()

PX_FORCE_INLINE void physx::Dy::Context::setFrictionOffsetThreshold ( PxReal  offset)
inline

Sets the friction offset threshold.

Parameters
[in]offsetThe friction offset threshold

◆ setFrictionType()

PX_FORCE_INLINE void physx::Dy::Context::setFrictionType ( PxFrictionType::Enum  f)
inline

Sets the friction model to be used.

Parameters
[in]fThe friction model to be used.

◆ setSolverArticBatchSize()

PX_FORCE_INLINE void physx::Dy::Context::setSolverArticBatchSize ( PxU32  f)
inline

Sets the solver batch size.

Parameters
[in]fThe solver batch size

◆ setSolverBatchSize()

PX_FORCE_INLINE void physx::Dy::Context::setSolverBatchSize ( PxU32  f)
inline

Sets the solver batch size.

Parameters
[in]fThe solver batch size

◆ update()

virtual void physx::Dy::Context::update ( IG::SimpleIslandManager &  simpleIslandManager,
PxBaseTask *  continuation,
PxBaseTask *  processLostTouchTask,
PxvNphaseImplementationContext *  nPhaseContext,
const PxU32  maxPatchesPerCM,
const PxU32  maxArticulationLinks,
const PxReal  dt,
const PxVec3 &  gravity,
PxBitMapPinned &  changedHandleMap 
)
pure virtual

The entry point for the constraint solver.

Parameters
[in]dtThe simulation time-step
[in]continuationThe continuation task for the solver
[in]processLostTouchTaskThe task that processes lost touches

This method is called after the island generation has completed. Its main responsibilities are: (1) Reserving the solver body pools (2) Initializing the static and kinematic solver bodies, which are shared resources between islands. (3) Construct the solver task chains for each island

Each island is solved as an independent solver task chain. In addition, large islands may be solved using multiple parallel tasks. Island solving is asynchronous. Once all islands have been solved, the continuation task will be called.

Implemented in physx::Dy::DynamicsContext, and physx::Dy::DynamicsTGSContext.

◆ updateBodyCore()

virtual void physx::Dy::Context::updateBodyCore ( PxBaseTask *  continuation)
pure virtual

This method copy gpu solver body data to cpu body core.

Implemented in physx::Dy::DynamicsContext, and physx::Dy::DynamicsTGSContext.


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