PxPhysicsGpu

Defined in include/gpu/PxPhysicsGpu.h

class PxPhysicsGpu

Public Functions

virtual PxIsosurfaceExtractor *createDenseGridIsosurfaceExtractor(PxCudaContextManager *cudaContextManager, const PxBounds3 &worldBounds, PxReal cellSize, const PxIsosurfaceParams &isosurfaceParams, PxU32 maxNumParticles, PxU32 maxNumVertices = 512 * 1024, PxU32 maxNumTriangles = 1024 * 1024) = 0

Creates an isosurface extractor operating on a dense grid.

Parameters
  • cudaContextManager[in] A cuda context manager

  • worldBounds[in] The bounds of the internally used dense grid. The isosurface can only be generated inside those bounds.

  • cellSize[in] The size of a single grid cell

  • isosurfaceParams[in] The isosurface parameters to control the isolevel etc.

  • maxNumParticles[in] The maximal number of particles that can be processed

  • maxNumVertices[in] The maximal number of vertices the output buffer can hold

  • maxNumTriangles[in] The maximal number of triangles the output buffer can hold

virtual PxSparseGridIsosurfaceExtractor *createSparseGridIsosurfaceExtractor(PxCudaContextManager *cudaContextManager, const PxSparseGridParams &sparseGridParams, const PxIsosurfaceParams &isosurfaceParams, PxU32 maxNumParticles, PxU32 maxNumVertices = 512 * 1024, PxU32 maxNumTriangles = 1024 * 1024) = 0

Creates an isosurface extractor operating on a sparse grid.

Parameters
  • cudaContextManager[in] A cuda context manager

  • sparseGridParams[in] The sparse grid parameters defining the cell size etc.

  • isosurfaceParams[in] The isosurface parameters to control the isolevel etc.

  • maxNumParticles[in] The maximal number of particles that can be processed

  • maxNumVertices[in] The maximal number of vertices the output buffer can hold

  • maxNumTriangles[in] The maximal number of triangles the output buffer can hold

virtual PxAnisotropyGenerator *createAnisotropyGenerator(PxCudaContextManager *cudaContextManager, PxU32 maxNumParticles, PxReal anisotropyScale = 1.0f, PxReal minAnisotropy = 0.1f, PxReal maxAnisotropy = 2.0f) = 0

Creates an anisotropy generator.

Parameters
  • cudaContextManager[in] A cuda context manager

  • maxNumParticles[in] The number of particles

  • anisotropyScale[in] A uniform scaling factor to increase or decrease anisotropy

  • minAnisotropy[in] The minimum scaling factor in any dimension that anisotropy can have

  • maxAnisotropy[in] The maximum scaling factor in any dimension that anisotropy can have

virtual PxSmoothedPositionGenerator *createSmoothedPositionGenerator(PxCudaContextManager *cudaContextManager, PxU32 maxNumParticles, PxReal smoothingStrength = 0.5f) = 0

Creates a smoothed position generator.

Parameters
  • cudaContextManager[in] A cuda context manager

  • maxNumParticles[in] The number of particles

  • smoothingStrength[in] Controls the strength of the smoothing effect

virtual PxParticleNeighborhoodProvider *createParticleNeighborhoodProvider(PxCudaContextManager *cudaContextManager, const PxU32 maxNumParticles, const PxReal cellSize, const PxU32 maxNumSparseGridCells = 262144) = 0

Creates a neighborhood provider.

Parameters
  • cudaContextManager[in] A cuda context manager

  • maxNumParticles[in] The number of particles

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

  • maxNumSparseGridCells[in] The maximal number of cells the internally used sparse grid can provide

virtual PxArrayConverter *createArrayConverter(PxCudaContextManager *cudaContextManager) = 0

Creates an array converter.

If not used anymore, the caller needs to delete the returned pointer.

Parameters

cudaContextManager[in] A cuda context manager

virtual PxSDFBuilder *createSDFBuilder(PxCudaContextManager *cudaContextManager) = 0

Creates sdf builder to construct sdfs quickly on the GPU.

If not used anymore, the caller needs to delete the returned pointer.

Parameters

cudaContextManager[in] A cuda context manager

Returns

Pointer to a new instance of a PxSDFBuilder

virtual PxDeformableSkinning *createDeformableSkinning(PxCudaContextManager *cudaContextManager) = 0

Creates a deformable skinning instance to perform skinning operations on the GPU.

If not used anymore, the caller needs to delete the returned pointer.

Parameters

cudaContextManager[in] A cuda context manager

Returns

Pointer to a new instance of a PxDeformableSkinning

virtual void release() = 0
inline virtual ~PxPhysicsGpu()