pub struct CarSetup { /* private fields */ }
Expand description
Setup of a car
The setup of a car in the F1 games consists of a set of parameters that players can adjust before leaving the garage.
Implementations§
Source§impl CarSetup
impl CarSetup
Sourcepub fn new(
front_wing: u8,
rear_wing: u8,
on_throttle: u8,
off_throttle: u8,
front_camber: f32,
rear_camber: f32,
front_toe: f32,
rear_toe: f32,
front_suspension: u8,
rear_suspension: u8,
front_anti_roll_bar: u8,
rear_anti_roll_bar: u8,
front_suspension_height: u8,
rear_suspension_height: u8,
brake_pressure: u8,
brake_bias: u8,
front_tyre_pressure: f32,
rear_tyre_pressure: f32,
ballast: u8,
fuel_load: f32,
) -> Self
pub fn new( front_wing: u8, rear_wing: u8, on_throttle: u8, off_throttle: u8, front_camber: f32, rear_camber: f32, front_toe: f32, rear_toe: f32, front_suspension: u8, rear_suspension: u8, front_anti_roll_bar: u8, rear_anti_roll_bar: u8, front_suspension_height: u8, rear_suspension_height: u8, brake_pressure: u8, brake_bias: u8, front_tyre_pressure: f32, rear_tyre_pressure: f32, ballast: u8, fuel_load: f32, ) -> Self
Constructs a new CarSetup
.
Source§impl CarSetup
impl CarSetup
Sourcepub fn front_wing(&self) -> u8
pub fn front_wing(&self) -> u8
Returns the setting for the front wing aero.
Sourcepub fn on_throttle(&self) -> u8
pub fn on_throttle(&self) -> u8
Returns the differential adjustment on throttle as a percentage.
Sourcepub fn off_throttle(&self) -> u8
pub fn off_throttle(&self) -> u8
Returns the differential adjustment off throttle as a percentage.
Sourcepub fn front_camber(&self) -> f32
pub fn front_camber(&self) -> f32
Returns the setting for the front camber angle.
Sourcepub fn rear_camber(&self) -> f32
pub fn rear_camber(&self) -> f32
Returns the setting for the rear camber angle.
Sourcepub fn front_suspension(&self) -> u8
pub fn front_suspension(&self) -> u8
Returns the front suspension setting.
Sourcepub fn rear_suspension(&self) -> u8
pub fn rear_suspension(&self) -> u8
Returns the rear suspension setting.
Sourcepub fn front_anti_roll_bar(&self) -> u8
pub fn front_anti_roll_bar(&self) -> u8
Returns the setting for the front anti-roll bar.
Sourcepub fn rear_anti_roll_bar(&self) -> u8
pub fn rear_anti_roll_bar(&self) -> u8
Returns the setting for the rear anti-roll bar.
Sourcepub fn front_suspension_height(&self) -> u8
pub fn front_suspension_height(&self) -> u8
Returns the setting for the front ride height.
Sourcepub fn rear_suspension_height(&self) -> u8
pub fn rear_suspension_height(&self) -> u8
Returns the setting for the rear right height.
Sourcepub fn brake_pressure(&self) -> u8
pub fn brake_pressure(&self) -> u8
Returns the setting for the brake pressure as a percentage.
Sourcepub fn brake_bias(&self) -> u8
pub fn brake_bias(&self) -> u8
Returns the setting for the brake bias as a percentage.
Sourcepub fn front_tyre_pressure(&self) -> f32
pub fn front_tyre_pressure(&self) -> f32
Returns the setting for the front tyre pressure in psi.
Sourcepub fn rear_tyre_pressure(&self) -> f32
pub fn rear_tyre_pressure(&self) -> f32
Returns the setting for the rear tyre pressure in psi.