Skip to main content

ParticleSystemData

Struct ParticleSystemData 

Source
pub struct ParticleSystemData {
Show 19 fields pub name: String, pub material_name: Option<String>, pub x_tiles: u32, pub y_tiles: u32, pub max_particles: u32, pub accel: [f32; 3], pub pre_sim: f32, pub drag: f32, pub wind_mult: f32, pub emitter_sources: Vec<[f32; 3]>, pub particle_size: [f32; 2], pub num_emitters: u32, pub particle_life_range: [f32; 2], pub particles_per_second: f32, pub velocity_range: [f32; 2], pub angle_range: f32, pub scale_range: [f32; 2], pub emitter_misc_flags: u32, pub emitter_color: [f32; 4],
}
Expand description

Minimal parsed particle system data.

Fields§

§name: String§material_name: Option<String>

Material key name (texture for particles).

§x_tiles: u32

Texture atlas dimensions.

§y_tiles: u32§max_particles: u32

Maximum particle count.

§accel: [f32; 3]

Acceleration vector (gravity/wind).

§pre_sim: f32

Pre-simulation time (seconds). First frame runs sim for this duration.

§drag: f32

Drag factor. Per-frame: vel *= max(0, 1 + drag * dt). Negative = decelerate.

§wind_mult: f32

Wind multiplier for environmental wind effects.

§emitter_sources: Vec<[f32; 3]>

Emitter source positions (from plSimpleParticleGenerator).

§particle_size: [f32; 2]

Particle size (width, height) from generator.

§num_emitters: u32

Number of emitters parsed.

§particle_life_range: [f32; 2]

Generator particle lifetime range (min, max) in seconds.

§particles_per_second: f32

Particles per second emission rate.

§velocity_range: [f32; 2]

Velocity range (min, max) for spawned particles.

§angle_range: f32

Cone angle range (radians) for spawn direction jitter.

§scale_range: [f32; 2]

Scale range (min, max) for particle size variation.

§emitter_misc_flags: u32

Emitter miscFlags — orientation mode + normal mode. C++ ref: plParticleEmitter.h:106-129 kNormalViewFacing=0x100, kOrientationUp=0x10000000, kOrientationVelocityBased=0x20000000, kOrientationVelocityStretch=0x40000000

§emitter_color: [f32; 4]

Emitter color (RGBA). Applied to all particles from this emitter.

Trait Implementations§

Source§

impl Clone for ParticleSystemData

Source§

fn clone(&self) -> ParticleSystemData

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParticleSystemData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.