output the number of particle when simulating #289
-
hi, when I use custom_scense.py to simulate the movement of water, if I want to print the number of particle for the water, should I use fluid.numParticles() https://github.com/InteractiveComputerGraphics/SPlisHSPlasH/blob/b7f8321bf999fed3bcd31d00a6070a23458e385a/pySPlisHSPlasH/examples/add_field.py#L50 if the water particle is moving, this two args are same, when the particle is staying still will these two args different? which is exactly represent the numbers of water particle when simulation> best regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Use "numActiveParticles()". If there are emitters in the scene, we allocate already the memory of all particles that will be emitted. Then numParticles give you the number of all particles (active + allocated but not yet emitted). numActiveParticles() returns the number of particles which are currently active in the simulation. |
Beta Was this translation helpful? Give feedback.
Use "numActiveParticles()". If there are emitters in the scene, we allocate already the memory of all particles that will be emitted. Then numParticles give you the number of all particles (active + allocated but not yet emitted). numActiveParticles() returns the number of particles which are currently active in the simulation.