pub struct BouncingBallsConfig {
pub width: f64,
pub height: f64,
pub gravity: f64,
pub restitution: f64,
pub trail_length: usize,
pub ball_count: usize,
}Expand description
Simulation configuration.
Fields§
§width: f64Canvas width in pixels.
height: f64Canvas height in pixels.
gravity: f64Gravitational acceleration (pixels/s^2, positive = downward).
restitution: f64Coefficient of restitution (1.0 = perfectly elastic).
trail_length: usizeMaximum trail length per ball.
ball_count: usizeNumber of balls.
Trait Implementations§
Source§impl Clone for BouncingBallsConfig
impl Clone for BouncingBallsConfig
Source§fn clone(&self) -> BouncingBallsConfig
fn clone(&self) -> BouncingBallsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BouncingBallsConfig
impl Debug for BouncingBallsConfig
Auto Trait Implementations§
impl Freeze for BouncingBallsConfig
impl RefUnwindSafe for BouncingBallsConfig
impl Send for BouncingBallsConfig
impl Sync for BouncingBallsConfig
impl Unpin for BouncingBallsConfig
impl UnsafeUnpin for BouncingBallsConfig
impl UnwindSafe for BouncingBallsConfig
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