PxGpuParticleSystem

Defined in include/PxParticleGpu.h

class PxGpuParticleSystem

Container class for a GPU particle system.

Used to communicate particle system parameters and simulation state between the internal SDK simulation and the particle system callbacks.

See PxPBDParticleSystem, PxParticleSystemCallback.

Public Functions

inline PxU32 getNumCells()

Returns the number of cells of the background simulation grid.

Returns

PxU32 the number of cells.

inline PxNeighborhoodIterator getIterator(PxU32 particleId) const

Get a PxNeighborhoodIterator initialized for usage with this particle system.

Parameters

particleId – An initial particle index for the initialization of the iterator.

Returns

An initialized PxNeighborhoodIterator.

Public Members

float4 *mUnsortedPositions_InvMass

GPU pointer to unsorted particle positions and inverse masses.

float4 *mUnsortedVelocities

GPU pointer to unsorted particle velocities.

PxU32 *mUnsortedPhaseArray

GPU pointer to unsorted particle phase array. See PxParticlePhaseFlag.

float4 *mSortedPositions_InvMass

GPU pointer to sorted particle positions.

float4 *mSortedVelocities

GPU pointer to sorted particle velocities.

PxU32 *mSortedPhaseArray

GPU pointer to sorted particle phase array.

PxU32 *mUnsortedToSortedMapping

GPU pointer to the mapping from unsortedParticle ID to sorted particle ID.

PxU32 *mSortedToUnsortedMapping

GPU pointer to the mapping from sorted particle ID to unsorted particle ID.

PxU32 *mParticleSelfCollisionCount

Per-particle neighborhood count.

PxU32 *mCollisionIndex

Set of sorted particle indices per neighbor.

PxsParticleMaterialData *mParticleMaterials

GPU pointer to the particle materials used in this particle system.

PxGpuParticleData mCommonData

Structure holding simulation parameters and state for this particle system. See PxGpuParticleData.