|
RavEngine
|
An interface class that the user can implement in order to receive simulation events. More...
#include <PxSimulationEventCallback.h>
Public Member Functions | |
| virtual void | onConstraintBreak (PxConstraintInfo *constraints, PxU32 count)=0 |
| This is called when a breakable constraint breaks. | |
| virtual void | onWake (PxActor **actors, PxU32 count)=0 |
| This is called with the actors which have just been woken up. | |
| virtual void | onSleep (PxActor **actors, PxU32 count)=0 |
| This is called with the actors which have just been put to sleep. | |
| virtual void | onContact (const PxContactPairHeader &pairHeader, const PxContactPair *pairs, PxU32 nbPairs)=0 |
| This is called when certain contact events occur. | |
| virtual void | onTrigger (PxTriggerPair *pairs, PxU32 count)=0 |
| This is called with the current trigger pair events. | |
| virtual void | onAdvance (const PxRigidBody *const *bodyBuffer, const PxTransform *poseBuffer, const PxU32 count)=0 |
| Provides early access to the new pose of moving rigid bodies. | |
An interface class that the user can implement in order to receive simulation events.
With the exception of onAdvance(), the events get sent during the call to either PxScene::fetchResults() or PxScene::flushSimulation() with sendPendingReports=true. onAdvance() gets called while the simulation is running (that is between PxScene::simulate() or PxScene::advance() and PxScene::fetchResults()).
Threading: With the exception of onAdvance(), it is not necessary to make these callbacks thread safe as they will only be called in the context of the user thread.
|
pure virtual |
Provides early access to the new pose of moving rigid bodies.
When this call occurs, rigid bodies having the PxRigidBodyFlag::eENABLE_POSE_INTEGRATION_PREVIEW flag set, were moved by the simulation and their new poses can be accessed through the provided buffers.
| [in] | bodyBuffer | The rigid bodies that moved and requested early pose reporting. |
| [in] | poseBuffer | The integrated rigid body poses of the bodies listed in bodyBuffer. |
| [in] | count | The number of entries in the provided buffers. |
Implemented in RavEngine::PhysicsSolver.
|
pure virtual |
This is called when a breakable constraint breaks.
| [in] | constraints | - The constraints which have been broken. |
| [in] | count | - The number of constraints |
Implemented in RavEngine::PhysicsSolver.
|
pure virtual |
This is called when certain contact events occur.
The method will be called for a pair of actors if one of the colliding shape pairs requested contact notification. You request which events are reported using the filter shader/callback mechanism (see PxSimulationFilterShader, #PxSimulationFilterCallback, #PxPairFlag).
Do not keep references to the passed objects, as they will be invalid after this function returns.
| [in] | pairHeader | Information on the two actors whose shapes triggered a contact report. |
| [in] | pairs | The contact pairs of two actors for which contact reports have been requested. See #PxContactPair. |
| [in] | nbPairs | The number of provided contact pairs. |
Implemented in RavEngine::PhysicsSolver.
|
pure virtual |
This is called with the actors which have just been put to sleep.
| [in] | actors | - The actors which have just been put to sleep. |
| [in] | count | - The number of actors |
Implemented in RavEngine::PhysicsSolver.
|
pure virtual |
This is called with the current trigger pair events.
Shapes which have been marked as triggers using PxShapeFlag::eTRIGGER_SHAPE will send events according to the pair flag specification in the filter shader (see #PxPairFlag, PxSimulationFilterShader).
| [in] | pairs | - The trigger pair events. |
| [in] | count | - The number of trigger pair events. |
Implemented in RavEngine::PhysicsSolver.
|
pure virtual |
This is called with the actors which have just been woken up.
| [in] | actors | - The actors which just woke up. |
| [in] | count | - The number of actors |
Implemented in RavEngine::PhysicsSolver.