#[repr(C)]pub struct GpuParticle {
pub position: [f32; 3],
pub age: f32,
pub velocity: [f32; 3],
pub lifetime: f32,
}Expand description
One particle slot in the pool the simulation kernel writes and the render
pair reads. Matches Particle in shaders/particle_types.slang, which
spells the same 32 bytes as two float4 lanes.
Fields§
§position: [f32; 3]World-space position.
age: f32Seconds since the particle spawned.
velocity: [f32; 3]World-space velocity in units per second.
lifetime: f32Total lifetime in seconds.
Trait Implementations§
Source§impl Clone for GpuParticle
impl Clone for GpuParticle
Source§fn clone(&self) -> GpuParticle
fn clone(&self) -> GpuParticle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GpuParticle
Source§impl Default for GpuParticle
impl Default for GpuParticle
Source§fn default() -> GpuParticle
fn default() -> GpuParticle
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GpuParticle
impl RefUnwindSafe for GpuParticle
impl Send for GpuParticle
impl Sync for GpuParticle
impl Unpin for GpuParticle
impl UnsafeUnpin for GpuParticle
impl UnwindSafe for GpuParticle
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