ExtGpu::PxParticleClothBufferHelper

Defined in include/extensions/PxParticleExt.h

class PxParticleClothBufferHelper

Helper class to manage PxParticleClothDesc buffers used for communicating particle based cloths to PxParticleClothBuffer.

Public Functions

virtual void release() = 0
virtual PxU32 getMaxCloths() const = 0
Returns

The maximum number of cloths this PxParticleClothBufferHelper can hold.

virtual PxU32 getNumCloths() const = 0
Returns

The current number of cloths in this PxParticleClothBufferHelper.

virtual PxU32 getMaxSprings() const = 0
Returns

The maximum number of springs this PxParticleClothBufferHelper can hold.

virtual PxU32 getNumSprings() const = 0
Returns

The current number of springs in this PxParticleClothBufferHelper.

virtual PxU32 getMaxTriangles() const = 0
Returns

The maximum number of triangles this PxParticleClothBufferHelper can hold.

virtual PxU32 getNumTriangles() const = 0
Returns

The current number of triangles in this PxParticleClothBufferHelper.

virtual PxU32 getMaxParticles() const = 0
Returns

The maximum number of particles this PxParticleClothBufferHelper can hold.

virtual PxU32 getNumParticles() const = 0
Returns

The current number of particles in this PxParticleClothBufferHelper.

virtual void addCloth(const PxParticleCloth &particleCloth, const PxU32 *triangles, const PxU32 numTriangles, const PxParticleSpring *springs, const PxU32 numSprings, const PxVec4 *restPositions, const PxU32 numParticles) = 0

Adds a PxParticleCloth to this PxParticleClothBufferHelper instance.

Parameters
  • particleCloth[in] The PxParticleCloth to be added.

  • triangles[in] A pointer to the triangles

  • numTriangles[in] The number of triangles

  • springs[in] A pointer to the springs

  • numSprings[in] The number of springs

  • restPositions[in] A pointer to the particle rest positions

  • numParticles[in] The number of particles in this cloth

virtual void addCloth(const PxReal blendScale, const PxReal restVolume, const PxReal pressure, const PxU32 *triangles, const PxU32 numTriangles, const PxParticleSpring *springs, const PxU32 numSprings, const PxVec4 *restPositions, const PxU32 numParticles) = 0

Adds a cloth to this PxParticleClothBufferHelper instance.

Adds a cloth to this PxParticleClothBufferHelper instance. With this method the relevant parameters for inflatable simulation (restVolume, pressure) can be set directly.

See also

PxParticleSpring

Parameters
  • blendScale[in] This should be 1.f / (numPartitions + 1) if the springs are partitioned by the user. Otherwise this will be set during spring partitioning.

  • restVolume[in] The rest volume of the inflatable

  • pressure[in] The pressure of the inflatable. The target inflatable volume is defined as restVolume * pressure. Setting this to > 0.0 will enable inflatable simulation.

  • triangles[in] A pointer to the triangles

  • numTriangles[in] The number of triangles

  • springs[in] A pointer to the springs

  • numSprings[in] The number of springs

  • restPositions[in] A pointer to the particle rest positions

  • numParticles[in] The number of particles in this cloth

virtual PxParticleClothDesc &getParticleClothDesc() = 0

Returns a PxParticleClothDesc for this PxParticleClothBufferHelper instance to be used for spring partitioning.

See also

PxCreateAndPopulateParticleClothBuffer, PxParticleClothPreProcessor::partitionSprings

Returns

the PxParticleClothDesc.

Protected Functions

inline virtual ~PxParticleClothBufferHelper()