|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
41 EngineSim(
float min_rpm,
float max_rpm,
float torque, std::vector<float> gears,
float dratio,
ActorPtr actor);
46 void PushNetworkState(
float engine_rpm,
float acc,
float clutch,
int gear,
bool running,
bool contact,
char auto_mode,
char auto_select=-1);
59 void SetEngineOptions(
float einertia,
char etype,
float eclutch,
float ctime,
float stime,
float pstime,
float irpm,
float srpm,
float maximix,
float minimix,
float ebraking);
65 void SetTurboOptions(
int type,
float tinertiaFactor,
int nturbos,
float param1,
float param2,
float param3,
float param4,
float param5,
float param6,
float param7,
float param8,
float param9,
float param10,
float param11);
float m_braking_torque
Engine attribute.
float m_tcase_ratio
Engine.
float m_ref_wheel_revolutions
Gears; estimated wheel revolutions based on current vehicle speed along the longi....
void SetEngineRpm(float rpm)
Set current engine RPM.
void PushNetworkState(float engine_rpm, float acc, float clutch, int gear, bool running, bool contact, char auto_mode, char auto_select=-1)
Sets current engine state;.
void setManualClutch(float val)
void SetClutch(float clutch)
void shift(int val)
Changes gear by a relative offset. Plays sounds.
float m_hydropump_state
Engine.
int GetGearRange()
low level gear changing
int m_engine_turbo_mode
Engine attribute.
void autoShiftSet(int mode)
void ToggleAutoShiftMode()
float m_turbo_bov_rpm[MAXTURBO]
bool m_engine_has_air
Engine attribute.
float m_min_wastegate_psi
float m_antilag_rand_chance
float m_cur_engine_rpm
Engine.
int m_kickdown_delay_counter
TorqueCurve * m_torque_curve
int m_cur_gear_range
Gears.
float m_turbo_engine_rpm_operation
std::deque< float > m_rpms
float m_turbo_wg_threshold_n
void updateShifts()
Changes gears. Plays sounds.
A land vehicle engine + transmission.
This class loads and processes a torque curve for a vehicle.
void SetAutoMode(RoR::SimGearboxMode mode)
float m_engine_max_rpm
Engine attribute.
void SetWheelSpin(float rpm)
Set current wheel spinning speed.
TorqueCurve * getTorqueCurve()
void autoSetAcc(float val)
void SetAcceleration(float val)
char m_engine_type
Engine attribute {'t' = truck (default), 'c' = car}.
bool m_turbo_has_wastegate
Processes a RigDef::Document (parsed from 'truck' file format) into a simulated gameplay object (Acto...
void UpdateEngineSim(float dt, int doUpdate)
float m_engine_idle_rpm
Engine attribute.
float m_one_third_rpm_range
void SetTurboOptions(int type, float tinertiaFactor, int nturbos, float param1, float param2, float param3, float param4, float param5, float param6, float param7, float param8, float param9, float param10, float param11)
Sets turbo options.
float m_engine_inertia
Engine attribute.
float m_post_shift_time
Shift attribute.
float m_engine_min_rpm
Engine attribute.
void SetTCaseRatio(float ratio)
Set current transfer case gear (reduction) ratio.
float m_engine_stall_rpm
Engine attribute.
int m_upshift_delay_counter
void UpdateInputEvents(float dt)
float m_cur_turbo_rpm[MAXTURBO]
RoR::SimGearboxMode GetAutoShiftMode()
float GetEngineRpm() const
bool m_engine_is_electric
Engine attribute.
int m_auto_mode
Transmission mode (.
Central state/object manager and communications hub.
float m_max_idle_mixture
Engine attribute.
float GetAccToHoldRPM()
estimate required throttle input to hold the current rpm
float m_min_idle_mixture
Engine attribute.
void SetGear(int v)
low level gear changing
int GetGear()
low level gear changing
EngineSim(float min_rpm, float max_rpm, float torque, std::vector< float > gears, float dratio, ActorPtr actor)
bool m_starter
Ignition switch is in START position.
void SetEngineOptions(float einertia, char etype, float eclutch, float ctime, float stime, float pstime, float irpm, float srpm, float maximix, float minimix, float ebraking)
Sets engine options.
float m_cur_wheel_revolutions
Gears; measured wheel revolutions.
void StopEngine()
stall engine
bool m_engine_has_turbo
Engine attribute.
float m_turbo_inertia_factor
float m_cur_clutch_torque
void StartEngine()
Quick engine start. Plays sounds.
bool m_engine_is_priming
Engine.
int m_cur_gear
Gears; Current gear {-1 = reverse, 0 = neutral, 1...21 = forward}.
float m_diff_ratio
Engine.
std::vector< float > m_gear_ratios
Gears.
void OffStart()
Quick start of vehicle engine.
void shiftTo(int val)
Changes gear to given value. Plays sounds.
float m_clutch_force
Clutch attribute.
bool m_contact
Ignition switch is in ON/RUN position.
int getNumGearsRanges() const
float m_antilag_power_factor
float m_engine_addi_torque[MAXTURBO]
std::deque< float > m_accs
void SetHydroPumpWork(float work)
Set current hydro pump work.
float m_clutch_time
Clutch attribute.
void SetGearRange(int v)
low level gear changing
float m_turbo_wg_threshold_p
float m_shift_time
Shift attribute.
float GetEngineTorque() const
float m_cur_engine_torque
Engine.
void SetEnginePriming(bool p)
Set current engine prime.
std::deque< float > m_brakes
bool m_engine_is_running
Engine state.
float m_engine_torque
Engine attribute.
char GetEngineType() const