O'Reilly logo

Learning Physics Modeling with PhysX by Krishna Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating particles

Once we are done with creating a particle system, it's time to create particles. If the particle system is of the PxParticleSystem type, we call the PxParticleSystem::createParticle() function to create a generic particle. On the other hand, if the particle system is of the PxParticleFluid type, we call the PxParticleFluid::createParticle()function to create an SPH particle. Both the functions require at least one parameter of the PxParticleCreationData type, which is basically a descriptor-like user-side class describing buffers for particle creation. It contains a particle-related description such as numParticles, indexBuffer, positionBuffer, velocityBuffer, restOffsetBuffer, and flagBuffer. Specifying the particle indices ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required