Struct liquidfun::box2d::particle::particle_system::ParticleSystem
[−]
[src]
pub struct ParticleSystem { pub ptr: *mut B2ParticleSystem, }
Fields
ptr |
Methods
impl ParticleSystem
fn create_particle(&self, pd: &ParticleDef) -> Int32
Create a particle whose properties have been defined. No reference to the definition is retained. A simulation step must occur before it's possible to interact with a newly created particle. For example, DestroyParticleInShape() will not destroy a particle until b2World::Step() has been called. @warning This function is locked during callbacks. @return the index of the particle.
fn destroy_particle(&self, index: Int32)
Destroy a particle. The particle is removed after the next simulation step (see b2World::Step()).
fn get_particle_count(&self) -> Int32
Get the number of particles.
fn get_particle_flags(&self, index: Int32) -> Option<ParticleFlags>
Get flags for a particle. See the ParticleFlags struct.
fn get_next(&self) -> Option<ParticleSystem>
Get the next particle-system in the world's particle-system list.
fn get_position_buffer(&self) -> &[Vec2]
Get the position of each particle