RavEngine
Loading...
Searching...
No Matches
physx::PxCustomParticleSystemSolverCallback Class Referenceabstract

Public Member Functions

virtual void onBegin (PxGpuParticleSystem *gpuParticleSystem, PxReal dt, CUstream stream)=0
 callback called when the particle solver begins.
 
virtual void onSolve (PxGpuParticleSystem *gpuParticleSystem, PxReal dt, CUstream stream)=0
 callback called during the iterative particle solve stage.
 
virtual void onFinalize (PxGpuParticleSystem *gpuParticleSystem, PxReal dt, CUstream stream)=0
 callback called after all solver iterations have completed.
 
virtual ~PxCustomParticleSystemSolverCallback ()
 Destructor.
 

Member Function Documentation

◆ onBegin()

virtual void physx::PxCustomParticleSystemSolverCallback::onBegin ( PxGpuParticleSystem *  gpuParticleSystem,
PxReal  dt,
CUstream  stream 
)
pure virtual

callback called when the particle solver begins.

This is called once per frame. It occurs after external forces have been pre-integrated into the particle state. It is called prior to the particles being reordered by spatial hash index, so state can be accessed in the unsorted buffers only at this stage. This provides an opportunity to add custom forces and modifications to position or velocity.

Parameters
[in]gpuParticleSystemA pointer to the GPU particle system. This pointer points to a mirror of the particle system in device memory.
[in]dtThe time-step.
[in]streamThe CUDA stream currently being used by the particle system. Additional kernels should either be launched on this stream, or synchronization events should be used to avoid race conditions.

◆ onFinalize()

virtual void physx::PxCustomParticleSystemSolverCallback::onFinalize ( PxGpuParticleSystem *  gpuParticleSystem,
PxReal  dt,
CUstream  stream 
)
pure virtual

callback called after all solver iterations have completed.

This callback will be called once per frame, after integration has completed.

Parameters
[in]gpuParticleSystemA pointer to the GPU particle system. This pointer points to a mirror of the particle system in device memory.
[in]dtThe time-step.
[in]streamThe CUDA stream currently being used by the particle system. Additional kernels should either be launched on this stream, or synchronization events should be used to avoid race conditions.

◆ onSolve()

virtual void physx::PxCustomParticleSystemSolverCallback::onSolve ( PxGpuParticleSystem *  gpuParticleSystem,
PxReal  dt,
CUstream  stream 
)
pure virtual

callback called during the iterative particle solve stage.

This callback will potentially be called multiple times between onBegin and onFinalize.

Parameters
[in]gpuParticleSystemA pointer to the GPU particle system. This pointer points to a mirror of the particle system in device memory.
[in]dtThe time-step.
[in]streamThe CUDA stream currently being used by the particle system. Additional kernels should either be launched on this stream, or synchronization events should be used to avoid race conditions.

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