54 PxReal sleepThreshold;
55 PxReal freezeThreshold;
66 PxU16 solverIterationCounts;
70#if PX_ENABLE_FEATURES_UNDER_CONSTRUCTION
71 PxFLIPParams flipParams;
72 PxMPMParams mpmParams;
76 PxReal particleContactOffset;
77 PxReal particleContactOffset_prev;
78 PxReal solidRestOffset;
79 PxReal fluidRestOffset;
80 PxReal fluidRestOffset_prev;
82 PxReal fluidBoundaryDensityScale;
84 PxReal maxDepenetrationVelocity;
93 PxU32 mMaxNeighborhood;
103 case (PxConcreteType::ePARTICLE_BUFFER):
105 particleBuffer->
bufferIndex = mParticleBuffers.size();
106 mParticleBuffers.pushBack(particleBuffer);
107 mParticleBufferUpdate =
true;
112 case (PxConcreteType::ePARTICLE_DIFFUSE_BUFFER):
114 particleBuffer->
bufferIndex = mParticleAndDiffuseBuffers.size();
116 mParticleAndDiffuseBufferUpdate =
true;
121 case (PxConcreteType::ePARTICLE_CLOTH_BUFFER):
123 particleBuffer->
bufferIndex = mClothBuffers.size();
125 mClothBufferUpdate =
true;
130 case (PxConcreteType::ePARTICLE_RIGID_BUFFER):
132 particleBuffer->
bufferIndex = mRigidBuffers.size();
134 mRigidBufferUpdate =
true;
159 case (PxConcreteType::ePARTICLE_BUFFER):
161 if (index < mParticleBuffers.size())
163 mParticleBuffers.replaceWithLast(particleBuffer->
bufferIndex);
164 if (mParticleBuffers.size() > index)
165 mParticleBuffers[index]->bufferIndex = index;
166 mParticleBufferUpdate =
true;
173 case (PxConcreteType::ePARTICLE_DIFFUSE_BUFFER):
175 if (index < mParticleAndDiffuseBuffers.size())
177 mParticleAndDiffuseBuffers.replaceWithLast(particleBuffer->
bufferIndex);
178 if (mParticleAndDiffuseBuffers.size() > index)
179 mParticleAndDiffuseBuffers[index]->bufferIndex = index;
181 mParticleAndDiffuseBufferUpdate =
true;
188 case (PxConcreteType::ePARTICLE_CLOTH_BUFFER):
190 if (index < mClothBuffers.size())
192 mClothBuffers.replaceWithLast(particleBuffer->
bufferIndex);
193 if (mClothBuffers.size() > index)
194 mClothBuffers[index]->bufferIndex = index;
195 mClothBufferUpdate =
true;
202 case (PxConcreteType::ePARTICLE_RIGID_BUFFER):
204 if (index < mParticleBuffers.size())
206 mRigidBuffers.replaceWithLast(particleBuffer->
bufferIndex);
207 if (mRigidBuffers.size() > index)
208 mRigidBuffers[index]->bufferIndex = index;
210 mRigidBufferUpdate =
true;
226 PxU32 getNumUserBuffers()
const {
return mParticleBuffers.size() + mClothBuffers.size() + mRigidBuffers.size() + mParticleAndDiffuseBuffers.size(); }
233 bool mParticleBufferUpdate;
234 bool mClothBufferUpdate;
235 bool mRigidBufferUpdate;
236 bool mParticleAndDiffuseBufferUpdate;
244 mParticleBufferUpdate =
false;
245 mClothBufferUpdate =
false;
246 mRigidBufferUpdate =
false;
247 mParticleAndDiffuseBufferUpdate =
false;
252 for(PxU32 i = 0; i < mParticleBuffers.
size(); ++i)
254 mParticleBuffers[i]->onParticleSystemDestroy();
257 for (PxU32 i = 0; i < mClothBuffers.
size(); ++i)
259 mClothBuffers[i]->onParticleSystemDestroy();
262 for (PxU32 i = 0; i < mRigidBuffers.
size(); ++i)
264 mRigidBuffers[i]->onParticleSystemDestroy();
267 for (PxU32 i = 0; i < mParticleAndDiffuseBuffers.
size(); ++i)
269 mParticleAndDiffuseBuffers[i]->onParticleSystemDestroy();
Definition DyParticleSystemCore.h:51
Definition PxCustomParticleSystemSolverCallback.h:51
A particle buffer used to simulate diffuse particles.
Definition PxParticleBuffer.h:283
The shared base class for all particle buffers, can be instantiated directly to simulate granular and...
Definition PxParticleBuffer.h:81
virtual void setInternalData(void *data)=0
Reserved for internal use.
PxU32 bufferIndex
Index of this buffer in the particle system it is assigned to.
Definition PxParticleBuffer.h:217
virtual void onParticleSystemDestroy()=0
Cleanup helper used in case a particle system is released before the particle buffers have been remov...
A particle buffer used to simulate particle cloth.
Definition PxParticleBuffer.h:429
A particle buffer used to simulate rigid bodies using shape matching with particles.
Definition PxParticleBuffer.h:491
Particle system callback base class to schedule work that should be done before, while or after the p...
Definition PxParticleSystem.h:77
PX_C_EXPORT PX_FOUNDATION_API physx::PxFoundation &PX_CALL_CONV PxGetFoundation()
Retrieves the Foundation SDK after it has been created.
Definition FdFoundation.cpp:279
Enum
Definition PxParticleSolverType.h:53