RavEngine
Loading...
Searching...
No Matches
physx::ExtGpu::ParticleClothBuffersImpl Struct Reference
Inheritance diagram for physx::ExtGpu::ParticleClothBuffersImpl:
[legend]
Collaboration diagram for physx::ExtGpu::ParticleClothBuffersImpl:
[legend]

Public Member Functions

 ParticleClothBuffersImpl (const PxU32 maxCloths, const PxU32 maxTriangles, const PxU32 maxSprings, const PxU32 maxParticles, PxCudaContextManager *cudaContextManager)
 
void release ()
 
PxU32 getMaxCloths () const
 
PxU32 getNumCloths () const
 
PxU32 getMaxSprings () const
 
PxU32 getNumSprings () const
 
PxU32 getMaxTriangles () const
 
PxU32 getNumTriangles () const
 
PxU32 getMaxParticles () const
 
PxU32 getNumParticles () const
 
void addCloth (const PxParticleCloth &particleCloth, const PxU32 *triangles, const PxU32 numTriangles, const PxParticleSpring *springs, const PxU32 numSprings, const PxVec4 *restPositions, const PxU32 numParticles)
 Adds a PxParticleCloth to this PxParticleClothBufferHelper instance.
 
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)
 Adds a cloth to this PxParticleClothBufferHelper instance.
 
PxParticleClothDesc & getParticleClothDesc ()
 Returns a PxParticleClothDesc for this PxParticleClothBufferHelper instance to be used for spring partitioning.
 
 ParticleClothBuffersImpl (const PxU32 maxCloths, const PxU32 maxTriangles, const PxU32 maxSprings, const PxU32 maxParticles, PxCudaContextManager *cudaContextManager)
 
void release ()
 
PxU32 getMaxCloths () const
 
PxU32 getNumCloths () const
 
PxU32 getMaxSprings () const
 
PxU32 getNumSprings () const
 
PxU32 getMaxTriangles () const
 
PxU32 getNumTriangles () const
 
PxU32 getMaxParticles () const
 
PxU32 getNumParticles () const
 
void addCloth (const PxParticleCloth &particleCloth, const PxU32 *triangles, const PxU32 numTriangles, const PxParticleSpring *springs, const PxU32 numSprings, const PxVec4 *restPositions, const PxU32 numParticles)
 Adds a PxParticleCloth to this PxParticleClothBufferHelper instance.
 
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)
 Adds a cloth to this PxParticleClothBufferHelper instance.
 
PxParticleClothDesc & getParticleClothDesc ()
 Returns a PxParticleClothDesc for this PxParticleClothBufferHelper instance to be used for spring partitioning.
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Public Attributes

PxU32 mMaxCloths
 
PxU32 mMaxSprings
 
PxU32 mMaxTriangles
 
PxU32 mMaxParticles
 
PxParticleClothDesc mClothDesc
 
PxCudaContextManager * mCudaContextManager
 

Member Function Documentation

◆ addCloth() [1/4]

void physx::ExtGpu::ParticleClothBuffersImpl::addCloth ( const PxParticleCloth &  particleCloth,
const PxU32 *  triangles,
const PxU32  numTriangles,
const PxParticleSpring *  springs,
const PxU32  numSprings,
const PxVec4 *  restPositions,
const PxU32  numParticles 
)
inlinevirtual

Adds a PxParticleCloth to this PxParticleClothBufferHelper instance.

Parameters
[in]particleClothThe PxParticleCloth to be added.
[in]trianglesA pointer to the triangles
[in]numTrianglesThe number of triangles
[in]springsA pointer to the springs
[in]numSpringsThe number of springs
[in]restPositionsA pointer to the particle rest positions
[in]numParticlesThe number of particles in this cloth
See also
PxParticleCloth PxParticleSpring

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ addCloth() [2/4]

void physx::ExtGpu::ParticleClothBuffersImpl::addCloth ( const PxParticleCloth &  particleCloth,
const PxU32 *  triangles,
const PxU32  numTriangles,
const PxParticleSpring *  springs,
const PxU32  numSprings,
const PxVec4 *  restPositions,
const PxU32  numParticles 
)
inlinevirtual

Adds a PxParticleCloth to this PxParticleClothBufferHelper instance.

Parameters
[in]particleClothThe PxParticleCloth to be added.
[in]trianglesA pointer to the triangles
[in]numTrianglesThe number of triangles
[in]springsA pointer to the springs
[in]numSpringsThe number of springs
[in]restPositionsA pointer to the particle rest positions
[in]numParticlesThe number of particles in this cloth
See also
PxParticleCloth PxParticleSpring

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ addCloth() [3/4]

void physx::ExtGpu::ParticleClothBuffersImpl::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 
)
inlinevirtual

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.

Parameters
[in]blendScaleThis should be 1.f / (numPartitions + 1) if the springs are partitioned by the user. Otherwise this will be set during spring partitioning.
[in]restVolumeThe rest volume of the inflatable
[in]pressureThe pressure of the inflatable. The target inflatable volume is defined as restVolume * pressure. Setting this to > 0.0 will enable inflatable simulation.
[in]trianglesA pointer to the triangles
[in]numTrianglesThe number of triangles
[in]springsA pointer to the springs
[in]numSpringsThe number of springs
[in]restPositionsA pointer to the particle rest positions
[in]numParticlesThe number of particles in this cloth
See also
PxParticleSpring

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ addCloth() [4/4]

void physx::ExtGpu::ParticleClothBuffersImpl::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 
)
inlinevirtual

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.

Parameters
[in]blendScaleThis should be 1.f / (numPartitions + 1) if the springs are partitioned by the user. Otherwise this will be set during spring partitioning.
[in]restVolumeThe rest volume of the inflatable
[in]pressureThe pressure of the inflatable. The target inflatable volume is defined as restVolume * pressure. Setting this to > 0.0 will enable inflatable simulation.
[in]trianglesA pointer to the triangles
[in]numTrianglesThe number of triangles
[in]springsA pointer to the springs
[in]numSpringsThe number of springs
[in]restPositionsA pointer to the particle rest positions
[in]numParticlesThe number of particles in this cloth
See also
PxParticleSpring

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getMaxCloths() [1/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getMaxCloths ( ) const
inlinevirtual
Returns
The maximum number of cloths this PxParticleClothBufferHelper can hold.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getMaxCloths() [2/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getMaxCloths ( ) const
inlinevirtual
Returns
The maximum number of cloths this PxParticleClothBufferHelper can hold.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getMaxParticles() [1/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getMaxParticles ( ) const
inlinevirtual
Returns
The maximum number of particles this PxParticleClothBufferHelper can hold.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getMaxParticles() [2/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getMaxParticles ( ) const
inlinevirtual
Returns
The maximum number of particles this PxParticleClothBufferHelper can hold.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getMaxSprings() [1/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getMaxSprings ( ) const
inlinevirtual
Returns
The maximum number of springs this PxParticleClothBufferHelper can hold.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getMaxSprings() [2/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getMaxSprings ( ) const
inlinevirtual
Returns
The maximum number of springs this PxParticleClothBufferHelper can hold.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getMaxTriangles() [1/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getMaxTriangles ( ) const
inlinevirtual
Returns
The maximum number of triangles this PxParticleClothBufferHelper can hold.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getMaxTriangles() [2/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getMaxTriangles ( ) const
inlinevirtual
Returns
The maximum number of triangles this PxParticleClothBufferHelper can hold.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getNumCloths() [1/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getNumCloths ( ) const
inlinevirtual
Returns
The current number of cloths in this PxParticleClothBufferHelper.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getNumCloths() [2/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getNumCloths ( ) const
inlinevirtual
Returns
The current number of cloths in this PxParticleClothBufferHelper.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getNumParticles() [1/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getNumParticles ( ) const
inlinevirtual
Returns
The current number of particles in this PxParticleClothBufferHelper.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getNumParticles() [2/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getNumParticles ( ) const
inlinevirtual
Returns
The current number of particles in this PxParticleClothBufferHelper.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getNumSprings() [1/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getNumSprings ( ) const
inlinevirtual
Returns
The current number of springs in this PxParticleClothBufferHelper.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getNumSprings() [2/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getNumSprings ( ) const
inlinevirtual
Returns
The current number of springs in this PxParticleClothBufferHelper.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getNumTriangles() [1/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getNumTriangles ( ) const
inlinevirtual
Returns
The current number of triangles in this PxParticleClothBufferHelper.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getNumTriangles() [2/2]

PxU32 physx::ExtGpu::ParticleClothBuffersImpl::getNumTriangles ( ) const
inlinevirtual
Returns
The current number of triangles in this PxParticleClothBufferHelper.

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getParticleClothDesc() [1/2]

PxParticleClothDesc & physx::ExtGpu::ParticleClothBuffersImpl::getParticleClothDesc ( )
inlinevirtual

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

Returns
the PxParticleClothDesc.
See also
PxCreateAndPopulateParticleClothBuffer, PxParticleClothPreProcessor::partitionSprings

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ getParticleClothDesc() [2/2]

PxParticleClothDesc & physx::ExtGpu::ParticleClothBuffersImpl::getParticleClothDesc ( )
inlinevirtual

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

Returns
the PxParticleClothDesc.
See also
PxCreateAndPopulateParticleClothBuffer, PxParticleClothPreProcessor::partitionSprings

Implements physx::ExtGpu::PxParticleClothBufferHelper.

◆ release() [1/2]

void physx::ExtGpu::ParticleClothBuffersImpl::release ( )
inlinevirtual

◆ release() [2/2]

void physx::ExtGpu::ParticleClothBuffersImpl::release ( )
inlinevirtual

The documentation for this struct was generated from the following files: