pub struct Particle {
pub age: f32,
pub lifespan: f32,
pub color: [f32; 4],
pub scale: [f32; 2],
pub tex_coord_head: [f32; 2],
pub tex_coord_tail: [f32; 2],
pub position: [f32; 3],
pub velocity: [f32; 3],
}Expand description
A single particle in the system
Fields§
§age: f32Current age in seconds
lifespan: f32Total lifespan in seconds
color: [f32; 4]Current color (RGBA, 0.0-1.0)
scale: [f32; 2]Current scale (width, height)
tex_coord_head: [f32; 2]Texture coordinates for head cell
tex_coord_tail: [f32; 2]Texture coordinates for tail cell (for ribbon particles)
position: [f32; 3]World-space position
velocity: [f32; 3]Velocity vector
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Particle
impl RefUnwindSafe for Particle
impl Send for Particle
impl Sync for Particle
impl Unpin for Particle
impl UnwindSafe for Particle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().