Struct liquidfun::box2d::particle::ParticleDef
[−]
[src]
pub struct ParticleDef { pub flags: ParticleFlags, pub position: Vec2, pub velocity: Vec2, pub color: ParticleColor, pub lifetime: Float32, pub user_data: size_t, pub group: Option<ParticleGroup>, }
A particle definition holds all the data needed to construct a particle. You can safely re-use these definitions.
Fields
flags: ParticleFlags
\brief Specifies the type of particle (see #b2ParticleFlag).
A particle may be more than one type. Multiple types are chained by logical sums, for example: pd.flags = b2_elasticParticle | b2_viscousParticle
position: Vec2
The world position of the particle.
velocity: Vec2
The linear velocity of the particle in world co-ordinates.
color: ParticleColor
The color of the particle.
lifetime: Float32
Lifetime of the particle in seconds. A value <= 0.0f indicates a particle with infinite lifetime.
user_data: size_t
Use this to store application-specific body data.
group: Option<ParticleGroup>
Trait Implementations
impl Default for ParticleDef
[src]
fn default() -> ParticleDef
Returns the "default value" for a type. Read more