PxParticleNeighborhoodProvider

Defined in include/PxParticleNeighborhoodProvider.h

class PxParticleNeighborhoodProvider

Computes neighborhood information for a point cloud.

Public Functions

virtual void buildNeighborhood(PxVec4 *deviceParticlePos, const PxU32 numParticles, CUstream stream, PxU32 *devicePhases = NULL, PxU32 validPhaseMask = PxParticlePhaseFlag::eParticlePhaseFluid, const PxU32 *deviceActiveIndices = NULL) = 0

Schedules the compuation of neighborhood information on the specified cuda stream.

Parameters
  • deviceParticlePos[in] A gpu pointer containing the particle positions

  • numParticles[in] The number of particles

  • stream[in] The stream on which the cuda call gets scheduled

  • devicePhases[in] An optional gpu pointer with particle phases

  • validPhaseMask[in] An optional phase mask to define which particles should be included into the neighborhood computation

  • deviceActiveIndices[in] An optional device pointer containing all indices of particles that are currently active

virtual PxU32 getMaxParticles() const = 0

Gets the maximal number of particles.

Returns

The maximal number of particles

virtual void setMaxParticles(PxU32 maxParticles) = 0

Sets the maximal number of particles.

Parameters

maxParticles[in] The maximal number of particles

virtual PxU32 getMaxGridCells() const = 0

Gets the maximal number of grid cells.

Returns

The maximal number of grid cells

virtual PxReal getCellSize() const = 0

Gets the cell size.

Returns

The cell size

virtual PxU32 getNumGridCellsInUse() const = 0

Gets the number of grid cells in use.

Returns

The number of grid cells in use

virtual void setCellProperties(PxU32 maxGridCells, PxReal cellSize) = 0

Sets the maximal number of particles.

Parameters
  • maxGridCells[in] The maximal number of grid cells

  • cellSize[in] The cell size. Should be equal to 2*contactOffset for PBD particle systems.

virtual void release() = 0

Releases the instance and its data.

inline virtual ~PxParticleNeighborhoodProvider()

Destructor.