Skip to main content

VehicleTrackSettings

Struct VehicleTrackSettings 

Source
pub struct VehicleTrackSettings { /* private fields */ }
Expand description

One track of a tracked vehicle (Jolt VehicleTrackSettings): the wheels it runs over and how the drivetrain turns it. The defaults are Jolt’s.

Implementations§

Source§

impl VehicleTrackSettings

Source

pub fn new(wheels: Vec<TrackedWheelSettings>, driven_wheel: u32) -> Self

A track over wheels (at least one), driven by the engine at driven_wheel, an index into wheels. The track’s speed is the driven wheel’s: every other wheel turns at the track speed over its own radius, so every radius must be within a factor limits::MAX_RATIO of the driven wheel’s.

Source

pub fn inertia(self, value: f32) -> Self

Moment of inertia of the track and its wheels about the driven wheel’s axle, kg·m², within limits::MIN_TRACK_INERTIA..=limits::MAX_TRACK_INERTIA and within a factor limits::MAX_TRACK_INERTIA_RATIO of the other track’s; the chassis bounds it too (limits::MAX_TRACK_MASS_RATIO). Default 10.

Source

pub fn angular_damping(self, value: f32) -> Self

Angular damping of the track, dω/dt = −c·ω, not negative. Default 0.5.

Source

pub fn max_brake_torque(self, value: f32) -> Self

Largest brake torque on the track, N·m, not negative. Default 15000.

Source

pub fn differential_ratio(self, value: f32) -> Self

Ratio between the gearbox and the driven wheel’s rotation rates, positive. Default 6.

Trait Implementations§

Source§

impl Clone for VehicleTrackSettings

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VehicleTrackSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for VehicleTrackSettings

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for VehicleTrackSettings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.