pub struct LayoutParams {
pub repulsion: f32,
pub attraction: f32,
pub ideal_len: f32,
pub gravity: f32,
pub damping: f32,
pub dt: f32,
pub min_dist: f32,
}Expand description
Force-layout tuning. Default is a calm, convergent spring system.
Fields§
§repulsion: f32Inverse-square repulsion strength (node spreading).
attraction: f32Spring (edge attraction) stiffness.
ideal_len: f32Spring rest length — the distance a single edge settles to.
gravity: f32Pull toward the origin (keeps a component from drifting / exploding).
damping: f32Per-step velocity retention ∈ (0,1) — < 1 bleeds energy so it settles.
dt: f32Integration timestep.
min_dist: f32Distance floor (clamps the repulsion singularity when two nodes coincide).
Trait Implementations§
Source§impl Clone for LayoutParams
impl Clone for LayoutParams
Source§fn clone(&self) -> LayoutParams
fn clone(&self) -> LayoutParams
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 LayoutParams
Source§impl Debug for LayoutParams
impl Debug for LayoutParams
Source§impl Default for LayoutParams
impl Default for LayoutParams
Source§impl PartialEq for LayoutParams
impl PartialEq for LayoutParams
impl StructuralPartialEq for LayoutParams
Auto Trait Implementations§
impl Freeze for LayoutParams
impl RefUnwindSafe for LayoutParams
impl Send for LayoutParams
impl Sync for LayoutParams
impl Unpin for LayoutParams
impl UnsafeUnpin for LayoutParams
impl UnwindSafe for LayoutParams
Blanket Implementations§
impl<T> Allocation for T
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