pub struct Ballistic(/* private fields */);Expand description
Coupled constant gravity and linear drag, including the zero-drag limit.
Implementations§
Source§impl Ballistic
impl Ballistic
Sourcepub fn burst(center: Point, count: u64) -> Self
pub fn burst(center: Point, count: u64) -> Self
Creates a seeded radial burst with default speed 80..160 and life 3s.
Sourcepub fn gravity(self, gravity: Vector2) -> Self
pub fn gravity(self, gravity: Vector2) -> Self
Replaces constant acceleration in units/squared second.
Trait Implementations§
Source§impl TrajectoryModel for Ballistic
impl TrajectoryModel for Ballistic
Source§fn analytic_bounds(&self, age: f32) -> Result<Option<Rect>, ValidationError>
fn analytic_bounds(&self, age: f32) -> Result<Option<Rect>, ValidationError>
Conservative extent of every particle center at this age, for models whose
Self::analytic_upload lets the GPU evaluate positions. Returning None keeps
the ordinary evaluated path.Source§fn birth_time(&self, _: u64) -> Time
fn birth_time(&self, _: u64) -> Time
Exact integer-tick birth time of one stable ID.
Source§fn state(
&self,
index: u64,
age: f32,
) -> Result<Option<Particle>, ValidationError>
fn state( &self, index: u64, age: f32, ) -> Result<Option<Particle>, ValidationError>
Complete state at this age; None means absent/dead.
Source§fn duration(&self) -> Option<Duration>
fn duration(&self) -> Option<Duration>
Optional finite natural duration for timeline registration.
Source§fn analytic_upload(
&self,
_age_seconds: f32,
_primitive: InstanceKind,
_align_to_velocity: bool,
) -> Result<Option<AnalyticInstanceUpload>, ValidationError>
fn analytic_upload( &self, _age_seconds: f32, _primitive: InstanceKind, _align_to_velocity: bool, ) -> Result<Option<AnalyticInstanceUpload>, ValidationError>
Optional seeded initial-state upload for supported random-access models.
Custom models and unsupported precision retain the ordinary evaluated path.
Auto Trait Implementations§
impl Forget for Ballistic
impl Freeze for Ballistic
impl Move for Ballistic
impl RefUnwindSafe for Ballistic
impl Send for Ballistic
impl Sync for Ballistic
impl Unpin for Ballistic
impl UnsafeUnpin for Ballistic
impl UnwindSafe for Ballistic
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