Struct libliquidfun_sys::box2d::ffi::b2ParticleSystemDef
source · #[repr(C)]pub struct b2ParticleSystemDef {Show 21 fields
pub strictContactCheck: bool,
pub density: f32,
pub gravityScale: f32,
pub radius: f32,
pub maxCount: int32,
pub pressureStrength: f32,
pub dampingStrength: f32,
pub elasticStrength: f32,
pub springStrength: f32,
pub viscousStrength: f32,
pub surfaceTensionPressureStrength: f32,
pub surfaceTensionNormalStrength: f32,
pub repulsiveStrength: f32,
pub powderStrength: f32,
pub ejectionStrength: f32,
pub staticPressureStrength: f32,
pub staticPressureRelaxation: f32,
pub staticPressureIterations: int32,
pub colorMixingStrength: f32,
pub destroyByAge: bool,
pub lifetimeGranularity: f32,
}Fields§
§strictContactCheck: boolEnable strict Particle/Body contact check. See SetStrictContactCheck for details.
density: f32Set the particle density. See SetDensity for details.
gravityScale: f32Change the particle gravity scale. Adjusts the effect of the global gravity vector on particles. Default value is 1.0f.
radius: f32Particles behave as circles with this radius. In Box2D units.
maxCount: int32Set 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.
pressureStrength: f32Increases pressure in response to compression Smaller values allow more compression
dampingStrength: f32Reduces velocity along the collision normal Smaller value reduces less
elasticStrength: f32Restores shape of elastic particle groups Larger values increase elastic particle velocity
springStrength: f32Restores length of spring particle groups Larger values increase spring particle velocity
viscousStrength: f32Reduces relative velocity of viscous particles Larger values slow down viscous particles more
surfaceTensionPressureStrength: f32Produces pressure on tensile particles 0~0.2. Larger values increase the amount of surface tension.
surfaceTensionNormalStrength: f32Smoothes outline of tensile particles 0~0.2. Larger values result in rounder, smoother, water-drop-like clusters of particles.
repulsiveStrength: f32Produces 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.
powderStrength: f32Produces repulsion between powder particles Larger values repulse more
ejectionStrength: f32Pushes particles out of solid particle group Larger values repulse more
staticPressureStrength: f32Produces 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
staticPressureRelaxation: f32Reduces instability in static pressure calculation Larger values make stabilize static pressure with fewer iterations
staticPressureIterations: int32Computes static pressure more precisely See SetStaticPressureIterations for details
colorMixingStrength: f32Determines how fast colors are mixed 1.0f ==> mixed immediately 0.5f ==> mixed half way each simulation step (see b2World::Step())
destroyByAge: boolWhether to destroy particles by age when no more particles can be created. See #b2ParticleSystem::SetDestructionByAge() for more information.
lifetimeGranularity: f32Granularity 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 (2^32 - 1) / (1.0f / lifetimeGranularity) seconds. With the value set to 1/60 the maximum lifetime or age of a particle is 2.27 years.
Implementations§
Trait Implementations§
source§impl CopyNew for b2ParticleSystemDef
impl CopyNew for b2ParticleSystemDef
source§unsafe fn copy_new(
other: &b2ParticleSystemDef,
this: Pin<&mut MaybeUninit<b2ParticleSystemDef>>
)
unsafe fn copy_new( other: &b2ParticleSystemDef, this: Pin<&mut MaybeUninit<b2ParticleSystemDef>> )
Synthesized copy constructor.
source§impl Drop for b2ParticleSystemDef
impl Drop for b2ParticleSystemDef
source§fn drop(self: &mut b2ParticleSystemDef)
fn drop(self: &mut b2ParticleSystemDef)
Synthesized destructor.
source§impl ExternType for b2ParticleSystemDef
impl ExternType for b2ParticleSystemDef
source§impl MakeCppStorage for b2ParticleSystemDef
impl MakeCppStorage for b2ParticleSystemDef
source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2ParticleSystemDef
unsafe fn allocate_uninitialized_cpp_storage() -> *mut b2ParticleSystemDef
source§unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2ParticleSystemDef)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut b2ParticleSystemDef)
source§impl MoveNew for b2ParticleSystemDef
impl MoveNew for b2ParticleSystemDef
source§unsafe fn move_new(
other: Pin<MoveRef<'_, b2ParticleSystemDef>>,
this: Pin<&mut MaybeUninit<b2ParticleSystemDef>>
)
unsafe fn move_new( other: Pin<MoveRef<'_, b2ParticleSystemDef>>, this: Pin<&mut MaybeUninit<b2ParticleSystemDef>> )
Synthesized move constructor.