Particles
Every particle in a PhysicsWorld, as parallel arrays that a Particle handle indexes. A removed particle's slot is handed out again by the next add, so hold on to handles only while their particles are alive.
Velocity is implicit, as in Verlet integration: the difference between where a particle is and where it was a substep ago. That's why the velocity setters move the previous position.
The arrays grow by doubling when a particle is added, never during a step.
toString gives how many particles are alive, for example Particles(size=120).
Types
Functions
Removes particle and every constraint that holds it, so that the particle that takes its slot, which may be handed out again, inherits none. Removing a particle that is gone does nothing. A particle of a soft body is removed with it instead, by SoftBodies.remove.
Puts particle on layers and has it collide with what is on a layer of mask and holds a layer of particle's in its own mask; see PhysicsLayers. The layers say nothing about the solids: see setSolidCollision. For a soft body's particles, set the whole body's with SoftBodies.setLayers.
Sets how particle moves. A Motion.BULLET is not held to PhysicsConfig.maxStep a substep: it goes as fast as it is thrown, and every substep it is swept from where it was to where it went and stopped where it first meets a solid, so it cannot pass through a thin one.
Sets whether particle is kept out of the solids, the SolidGrid and its moving solids. It is SolidCollision.COLLIDE by default; a SolidCollision.PASS particle falls through the level. For a soft body's particles, set the whole body's with SoftBodies.setSolidCollision.
Returns whether particle is kept out of the solids: see setSolidCollision.