Struct liquidfun::box2d::particle::particle_system::ParticleSystemDef [] [src]

pub struct ParticleSystemDef {
    pub strict_contact_check: bool,
    pub density: Float32,
    pub gravity_scale: Float32,
    pub radius: Float32,
    pub max_count: Int32,
    pub pressure_strength: Float32,
    pub damping_strength: Float32,
    pub elastic_strength: Float32,
    pub spring_strength: Float32,
    pub viscous_strength: Float32,
    pub surface_tension_pressure_strength: Float32,
    pub surface_tension_normal_strength: Float32,
    pub repulsive_strength: Float32,
    pub powder_strength: Float32,
    pub ejection_strength: Float32,
    pub static_pressure_strength: Float32,
    pub static_pressure_relaxation: Float32,
    pub static_pressure_iterations: Int32,
    pub color_mixing_strength: Float32,
    pub destroy_by_age: bool,
    pub lifetime_granularity: Float32,
}

Fields

strict_contact_check

Enable strict Particle/Body contact check. See SetStrictContactCheck for details.

density

Set the particle density. See SetDensity for details.

gravity_scale

Change the particle gravity scale. Adjusts the effect of the global gravity vector on particles. Default value is 1.0f.

radius

Particles behave as circles with this radius. In Box2D units.

max_count

Set the maximum number of particles. By default, there is no maximum. The particle buffers can continue to grow while b2World's block allocator still has memory. See SetMaxParticleCount for details.

pressure_strength

Increases pressure in response to compression Smaller values allow more compression

damping_strength

Reduces velocity along the collision normal Smaller value reduces less

elastic_strength

Restores shape of elastic particle groups Larger values increase elastic particle velocity

spring_strength

Restores length of spring particle groups Larger values increase spring particle velocity

viscous_strength

Reduces relative velocity of viscous particles Larger values slow down viscous particles more

surface_tension_pressure_strength

Produces pressure on tensile particles 0~0.2. Larger values increase the amount of surface tension.

surface_tension_normal_strength

Smoothes outline of tensile particles 0~0.2. Larger values result in rounder, smoother, water-drop-like clusters of particles.

repulsive_strength

Produces additional pressure on repulsive particles Larger values repulse more Negative values mean attraction. The range where particles behave stably is about -0.2 to 2.0.

powder_strength

Produces repulsion between powder particles Larger values repulse more

ejection_strength

Pushes particles out of solid particle group Larger values repulse more

static_pressure_strength

Produces static pressure Larger values increase the pressure on neighboring partilces For a description of static pressure, see http://en.wikipedia.org/wiki/Static_pressure#Static_pressure_in_fluid_dynamics

static_pressure_relaxation

Reduces instability in static pressure calculation Larger values make stabilize static pressure with fewer iterations

static_pressure_iterations

Computes static pressure more precisely See SetStaticPressureIterations for details

color_mixing_strength

Determines how fast colors are mixed 1.0f ==> mixed immediately 0.5f ==> mixed half way each simulation step (see b2World::Step())

destroy_by_age

Whether to destroy particles by age when no more particles can be created. See #b2ParticleSystem::SetDestructionByAge() for more information.

lifetime_granularity

Granularity of particle lifetimes in seconds. By default this is set to (1.0f / 60.0f) seconds. b2ParticleSystem uses a 32-bit signed value to track particle lifetimes so the maximum lifetime of a particle is (232 - 1) / (1.0f / lifetimeGranularity) seconds. With the value set to 1/60 the maximum lifetime or age of a particle is 2.27 years.

Trait Implementations

impl Default for ParticleSystemDef

fn default() -> ParticleSystemDef

Derived Implementations

impl Debug for ParticleSystemDef

fn fmt(&self, __arg_0: &mut Formatter) -> Result