Data layout descriptor for reading particle data from the SDK. More...
#include <PxParticleReadData.h>
Public Member Functions | |
virtual PxDataAccessFlags | getDataAccessFlags ()=0 |
Returns PxDataAccessFlag::eREADABLE, since PxParticleReadData is read only data. More... | |
virtual void | unlock ()=0 |
Unlocks the data. More... | |
virtual | ~PxParticleReadData () |
virtual destructor More... | |
Public Member Functions inherited from PxLockedData | |
virtual | ~PxLockedData () |
virtual destructor More... | |
Public Attributes | |
PxU32 | nbValidParticles |
Number of particles (only including particles with PxParticleFlag.eVALID set). More... | |
PxU32 | validParticleRange |
Index after the last valid particle (PxParticleFlag.eVALID set). Its 0 if there are no valid particles. More... | |
const PxU32 * | validParticleBitmap |
Bitmap marking valid particle indices. The bitmap is defined between [0, (PxParticleReadData.validParticleRange-1) >> 5]. More... | |
PxStrideIterator< const PxVec3 > | positionBuffer |
Particle position data. More... | |
PxStrideIterator< const PxVec3 > | velocityBuffer |
Particle velocity data. More... | |
PxStrideIterator< const PxF32 > | restOffsetBuffer |
Particle rest offset data. More... | |
PxStrideIterator< const PxParticleFlags > | flagsBuffer |
Particle flags. More... | |
PxStrideIterator< const PxVec3 > | collisionNormalBuffer |
Collision normals of colliding particles. The collision normal buffer is only guaranteed to be valid after the particle system has been simulated. Otherwise collisionNormalBuffer.ptr() is NULL. This also applies to particle systems that are not assigned to a scene. More... | |
PxStrideIterator< const PxVec3 > | collisionVelocityBuffer |
Velocities of particles relative to shapes they collide with. The collision velocity buffer is only guaranteed to be valid after the particle system has been simulated. Otherwise collisionVelocityBuffer.ptr() is NULL. This also applies to particle systems that are not assigned to a scene. The collision velocity is identical to the particle velocity if the particle is not colliding. More... | |
Data layout descriptor for reading particle data from the SDK.
PxParticleReadData is used to retrieve information about simulated particles. It can be accessed by calling PxParticleBase.lockParticleReadData().
Each particle is described by its position, velocity, a set of (PxParticleFlag) flags and information on collisions (collision normal). The particle buffers are sparse, i.e. occupied particle indices will have PxParticleFlag.eVALID set in the corresponding entry of PxParticleReadData.flagsBuffer. Alternatively valid particles can be identified with the bitmap PxParticleReadData.validParticleBitmap. If (and only if) the index range of valid particles PxParticleReadData.validParticleRange is greater 0, i.e. any particles are present, data can be read from the particle buffers. Additionally individual particle buffers can only be read if the corresponding PxParticleReadDataFlag in particleReadDataFlags is set.
The particle data buffer are defined in the range [0, PxParticleReadData.validParticleRange-1]. The bitmap words are defined in the range [0, (PxParticleReadData.validParticleRange-1) >> 5].
|
inlinevirtual |
virtual destructor
|
pure virtual |
Returns PxDataAccessFlag::eREADABLE, since PxParticleReadData is read only data.
Implements PxLockedData.
|
pure virtual |
PxStrideIterator<const PxVec3> PxParticleReadData::collisionNormalBuffer |
Collision normals of colliding particles. The collision normal buffer is only guaranteed to be valid after the particle system has been simulated. Otherwise collisionNormalBuffer.ptr() is NULL. This also applies to particle systems that are not assigned to a scene.
PxStrideIterator<const PxVec3> PxParticleReadData::collisionVelocityBuffer |
Velocities of particles relative to shapes they collide with. The collision velocity buffer is only guaranteed to be valid after the particle system has been simulated. Otherwise collisionVelocityBuffer.ptr() is NULL. This also applies to particle systems that are not assigned to a scene. The collision velocity is identical to the particle velocity if the particle is not colliding.
PxStrideIterator<const PxParticleFlags> PxParticleReadData::flagsBuffer |
Particle flags.
PxU32 PxParticleReadData::nbValidParticles |
Number of particles (only including particles with PxParticleFlag.eVALID set).
PxStrideIterator<const PxVec3> PxParticleReadData::positionBuffer |
Particle position data.
PxStrideIterator<const PxF32> PxParticleReadData::restOffsetBuffer |
Particle rest offset data.
const PxU32* PxParticleReadData::validParticleBitmap |
Bitmap marking valid particle indices. The bitmap is defined between [0, (PxParticleReadData.validParticleRange-1) >> 5].
PxU32 PxParticleReadData::validParticleRange |
Index after the last valid particle (PxParticleFlag.eVALID set). Its 0 if there are no valid particles.
PxStrideIterator<const PxVec3> PxParticleReadData::velocityBuffer |
Particle velocity data.