pub struct PySuspension {
pub kind: SuspensionKind,
pub spring_rate: f64,
pub damper_compression: f64,
pub damper_rebound: f64,
pub arb_stiffness: f64,
pub bump_stop_rate: f64,
pub bump_stop_clearance: f64,
pub displacement: f64,
pub velocity: f64,
pub max_compression: f64,
pub max_droop: f64,
}Expand description
One corner suspension.
Fields§
§kind: SuspensionKindSuspension geometry type.
spring_rate: f64Spring rate (N/m).
damper_compression: f64Damper coefficient in compression (N·s/m).
damper_rebound: f64Damper coefficient in rebound (N·s/m).
arb_stiffness: f64Anti-roll bar stiffness (N·m/rad).
bump_stop_rate: f64Bump stop spring rate (N/m), activated near max compression.
bump_stop_clearance: f64Bump stop activation distance from maximum compression (m).
displacement: f64Current displacement from rest (m, positive = compression).
velocity: f64Current displacement velocity (m/s).
max_compression: f64Maximum compression travel (m).
max_droop: f64Maximum droop travel (m).
Implementations§
Source§impl PySuspension
impl PySuspension
Sourcepub fn double_wishbone() -> Self
pub fn double_wishbone() -> Self
Create a default double wishbone suspension.
Sourcepub fn macpherson() -> Self
pub fn macpherson() -> Self
Create a MacPherson strut suspension.
Trait Implementations§
Source§impl Clone for PySuspension
impl Clone for PySuspension
Source§fn clone(&self) -> PySuspension
fn clone(&self) -> PySuspension
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 PySuspension
impl Debug for PySuspension
Source§impl<'de> Deserialize<'de> for PySuspension
impl<'de> Deserialize<'de> for PySuspension
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PySuspension
impl RefUnwindSafe for PySuspension
impl Send for PySuspension
impl Sync for PySuspension
impl Unpin for PySuspension
impl UnsafeUnpin for PySuspension
impl UnwindSafe for PySuspension
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.