pub struct WheelState {Show 24 fields
pub position_local: Vec3,
pub radius: f32,
pub width: f32,
pub suspension_rest_length: f32,
pub suspension_max_travel: f32,
pub suspension_stiffness: f32,
pub suspension_damping: f32,
pub current_compression: f32,
pub suspension_force: f32,
pub contact_point: Vec3,
pub contact_normal: Vec3,
pub is_grounded: bool,
pub slip_angle: f32,
pub slip_ratio: f32,
pub lateral_force: f32,
pub longitudinal_force: f32,
pub steer_angle: f32,
pub angular_velocity: f32,
pub brake_torque: f32,
pub drive_torque: f32,
pub friction_limit: f32,
pub rolling_resistance: f32,
pub camber_angle: f32,
pub road_surface: SurfaceType,
}Fields§
§position_local: Vec3§radius: f32§width: f32§suspension_rest_length: f32§suspension_max_travel: f32§suspension_stiffness: f32§suspension_damping: f32§current_compression: f32§suspension_force: f32§contact_point: Vec3§contact_normal: Vec3§is_grounded: bool§slip_angle: f32§slip_ratio: f32§lateral_force: f32§longitudinal_force: f32§steer_angle: f32§angular_velocity: f32§brake_torque: f32§drive_torque: f32§friction_limit: f32§rolling_resistance: f32§camber_angle: f32§road_surface: SurfaceTypeImplementations§
Source§impl WheelState
impl WheelState
pub fn new(position_local: Vec3, radius: f32) -> Self
Sourcepub fn compute_suspension_force(&mut self, compression_velocity: f32) -> f32
pub fn compute_suspension_force(&mut self, compression_velocity: f32) -> f32
Compute suspension force using spring-damper model F_susp = k * compression + c * compression_velocity
Sourcepub fn compute_tire_forces(&mut self, normal_force: f32, surface_friction: f32)
pub fn compute_tire_forces(&mut self, normal_force: f32, surface_friction: f32)
Compute tire forces using Pacejka model
Sourcepub fn compute_slip_angle(&mut self, wheel_vel_local: Vec3)
pub fn compute_slip_angle(&mut self, wheel_vel_local: Vec3)
Compute slip angle from wheel velocity in local frame
Sourcepub fn compute_slip_ratio(&mut self, vehicle_speed: f32)
pub fn compute_slip_ratio(&mut self, vehicle_speed: f32)
Compute longitudinal slip ratio
Trait Implementations§
Source§impl Clone for WheelState
impl Clone for WheelState
Auto Trait Implementations§
impl Freeze for WheelState
impl RefUnwindSafe for WheelState
impl Send for WheelState
impl Sync for WheelState
impl Unpin for WheelState
impl UnsafeUnpin for WheelState
impl UnwindSafe for WheelState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.