RigsofRods
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | Friends
RoR::Engine Class Reference

A land vehicle engine + transmission. More...

#include <Engine.h>

+ Inheritance diagram for RoR::Engine:
+ Collaboration diagram for RoR::Engine:

Public Types

enum  autoswitch {
  REAR, NEUTRAL, DRIVE, TWO,
  ONE, MANUALMODE
}
 
enum  turbomode { OLD, NEW }
 

Public Member Functions

 Engine (float min_rpm, float max_rpm, float torque, float reverse_gear, float neutral_gear, std::vector< float > gears, float dratio, ActorPtr actor)
 
 ~Engine ()
 
void SetEngineOptions (float einertia, char etype, float eclutch, float ctime, float stime, float pstime, float irpm, float srpm, float maximix, float minimix, float ebraking)
 
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)
 
Definition; keyword 'engine'
float getGearRatio (int pos)
 -1=R, 0=N, 1... ('engine' attrs #5[R],#6[N],#7[1]...) More...
 
int getNumGears () const
 
int getNumGearsRanges () const
 
Definition, Keyword 'engoption'
bool isElectric () const
 
bool hasAir () const
 
bool hasTurbo () const
 
float getBrakingTorque () const
 
Definition, Keyword 'torquecurve'
TorqueCurvegetTorqueCurve ()
 
General state getters
float getAcc ()
 
float getClutch () const
 
float getCrankFactor ()
 
float getRPM ()
 
float getSmoke ()
 
float getTorque ()
 
float getTurboPSI ()
 
SimGearboxMode getAutoMode ()
 
int getGear ()
 
int getGearRange ()
 
bool isRunning ()
 
float getCurEngineTorque ()
 
float getInputShaftRPM ()
 
float getDriveRatio ()
 
float getEnginePower ()
 
float getEnginePower (float rpm)
 
float getTurboPower ()
 
float getIdleMixture ()
 
float getPrimeMixture ()
 
int getAutoShift ()
 
float getAccToHoldRPM ()
 estimate required throttle input to hold the current rpm More...
 
Shifting diagnostic
float getPostShiftClock ()
 
float getShiftClock ()
 
bool isPostShifting ()
 
bool isShifting ()
 
int getShifTargetGear ()
 
float getAutoShiftBehavior ()
 
int getUpshiftDelayCounter ()
 
int getKickdownDelayCounter ()
 
General state changes
void pushNetworkState (float engine_rpm, float acc, float clutch, int gear, bool running, bool contact, char auto_mode, char auto_select=-1)
 
void setAcc (float val)
 
void autoSetAcc (float val)
 
void setClutch (float clutch)
 
void setRPM (float rpm)
 
void setWheelSpin (float rpm)
 
void setAutoMode (SimGearboxMode mode)
 
void setPrime (bool p)
 
void setHydroPump (float work)
 
void setManualClutch (float val)
 
void setTCaseRatio (float ratio)
 Set current transfer case gear (reduction) ratio. More...
 
void toggleContact ()
 Ignition. More...
 
void offStart ()
 Quick start of vehicle engine. More...
 
void startEngine ()
 Quick engine start. Plays sounds. More...
 
void stopEngine ()
 stall engine More...
 
Shifting
void toggleAutoMode ()
 
void autoShiftDown ()
 
void autoShiftSet (int mode)
 
void autoShiftUp ()
 
void setGear (int v)
 low level gear changing (bypasses shifting logic) More...
 
void setGearRange (int v)
 low level gear changing (bypasses shifting logic) More...
 
void shift (int val)
 Changes gear by a relative offset. Plays sounds. More...
 
void shiftTo (int val)
 Changes gear to given value. Plays sounds. More...
 
Updates
void updateShifts ()
 Changes gears. Plays sounds. More...
 
void UpdateEngine (float dt, int doUpdate)
 
void UpdateEngineAudio ()
 
void UpdateInputEvents (float dt)
 
- Public Member Functions inherited from RefCountingObject< Engine >
 RefCountingObject ()
 
virtual ~RefCountingObject ()
 
void AddRef ()
 
void Release ()
 

Private Attributes

ActorPtr m_actor
 
float m_ref_wheel_revolutions
 Gears; estimated wheel revolutions based on current vehicle speed along the longi. axis. More...
 
float m_cur_wheel_revolutions
 Gears; measured wheel revolutions. More...
 
int m_cur_gear
 Gears; Current gear {-1 = reverse, 0 = neutral, 1...21 = forward}. More...
 
int m_cur_gear_range
 Gears. More...
 
int m_num_gears
 Num. forward gears. More...
 
std::vector< float > m_gear_ratios
 [R|N|1|...] ('engine' attrs #4[global],#5[R],#6[N],#7[1]...) More...
 
float m_clutch_force
 ('engoption' attr #3) More...
 
float m_clutch_time
 Time (in seconds) the clutch takes to apply ('engoption' attr #5) More...
 
float m_cur_clutch
 
float m_cur_clutch_torque
 
bool m_engine_is_electric
 Engine attribute. More...
 
bool m_engine_has_air
 Engine attribute. More...
 
bool m_engine_has_turbo
 Engine attribute. More...
 
int m_engine_turbo_mode
 Engine attribute. More...
 
bool m_engine_is_running
 Engine state. More...
 
char m_engine_type
 't' = truck (default), 'c' = car ('engoption' attr #2) More...
 
float m_braking_torque
 Engine attribute. More...
 
float m_cur_acc
 Engine. More...
 
float m_cur_engine_rpm
 Engine. More...
 
float m_cur_engine_torque
 Engine. More...
 
float m_diff_ratio
 Global gear ratio ('engine' attr #4) More...
 
float m_tcase_ratio
 Engine. More...
 
float m_engine_torque
 Torque in N/m ('engine' attr #3) More...
 
float m_hydropump_state
 Engine. More...
 
float m_min_idle_mixture
 Minimum throttle to maintain the idle RPM ('engoption' attr #10) More...
 
float m_max_idle_mixture
 Maximum throttle to maintain the idle RPM ('engoption' attr #9) More...
 
float m_engine_inertia
 ('engoption' attr #1) More...
 
float m_engine_max_rpm
 Shift up RPM ('engine' attr #2) More...
 
float m_engine_shiftup_rpm
 Shift down RPM ('engine' attr #1) More...
 
float m_engine_idle_rpm
 ('engoption' attr #8) More...
 
float m_engine_stall_rpm
 ('engoption' attr #7) More...
 
bool m_engine_is_priming
 Engine. More...
 
TorqueCurvem_torque_curve
 
float m_air_pressure
 
bool m_contact
 Ignition switch is in ON/RUN position. More...
 
bool m_starter
 Ignition switch is in START position. More...
 
float m_post_shift_time
 Time (in seconds) until full torque is transferred ('engoption' attr #6) More...
 
float m_post_shift_clock
 
float m_shift_time
 Time (in seconds) that it takes to shift ('engoption' attr #4) More...
 
float m_shift_clock
 
int m_post_shifting
 
int m_shifting
 
int m_shift_val
 
SimGearboxMode m_auto_mode
 
autoswitch m_autoselect
 
float m_auto_cur_acc
 
float m_full_rpm_range
 
float m_one_third_rpm_range
 
float m_half_rpm_range
 
float m_shift_behaviour
 
int m_upshift_delay_counter
 
int m_kickdown_delay_counter
 
std::deque< float > m_rpms
 
std::deque< float > m_accs
 
std::deque< float > m_brakes
 
int m_turbo_ver
 
float m_cur_turbo_rpm [MAXTURBO]
 
float m_turbo_inertia_factor
 
int m_num_turbos
 
int m_max_turbo_rpm
 
float m_engine_addi_torque [MAXTURBO]
 
float m_turbo_engine_rpm_operation
 
bool m_turbo_has_bov
 
float m_turbo_bov_rpm [MAXTURBO]
 
int m_min_bov_psi
 
bool m_turbo_has_wastegate
 
float m_min_wastegate_psi
 
bool m_turbo_flutters
 
float m_turbo_wg_threshold_p
 
float m_turbo_wg_threshold_n
 
bool m_turbo_has_antilag
 
float m_antilag_min_rpm
 
float m_antilag_rand_chance
 
float m_antilag_power_factor
 

Friends

class ActorSpawner
 
class Actor
 

Additional Inherited Members

- Static Public Member Functions inherited from RefCountingObject< Engine >
static void RegisterRefCountingObject (AS_NAMESPACE_QUALIFIER asIScriptEngine *engine, const char *name)
 
- Data Fields inherited from RefCountingObject< Engine >
int m_refcount
 
std::mutex m_refcount_mtx
 

Detailed Description

A land vehicle engine + transmission.

Definition at line 41 of file Engine.h.

Member Enumeration Documentation

◆ autoswitch

Enumerator
REAR 
NEUTRAL 
DRIVE 
TWO 
ONE 
MANUALMODE 

Definition at line 167 of file Engine.h.

◆ turbomode

Enumerator
OLD 
NEW 

Definition at line 177 of file Engine.h.

Constructor & Destructor Documentation

◆ Engine()

Engine::Engine ( float  min_rpm,
float  max_rpm,
float  torque,
float  reverse_gear,
float  neutral_gear,
std::vector< float >  gears,
float  dratio,
ActorPtr  actor 
)

Definition at line 37 of file Engine.cpp.

◆ ~Engine()

Engine::~Engine ( )

Definition at line 121 of file Engine.cpp.

Member Function Documentation

◆ autoSetAcc()

void Engine::autoSetAcc ( float  val)

Definition at line 1075 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autoShiftDown()

void Engine::autoShiftDown ( )

Definition at line 1171 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autoShiftSet()

void Engine::autoShiftSet ( int  mode)

Definition at line 1154 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ autoShiftUp()

void Engine::autoShiftUp ( )

Definition at line 1162 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAcc()

float Engine::getAcc ( )

Definition at line 880 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getAccToHoldRPM()

float Engine::getAccToHoldRPM ( )

estimate required throttle input to hold the current rpm

Definition at line 1069 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAutoMode()

RoR::SimGearboxMode Engine::getAutoMode ( )

Definition at line 842 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getAutoShift()

int Engine::getAutoShift ( )

Definition at line 1181 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getAutoShiftBehavior()

float RoR::Engine::getAutoShiftBehavior ( )
inline

Definition at line 123 of file Engine.h.

◆ getBrakingTorque()

float RoR::Engine::getBrakingTorque ( ) const
inline

Definition at line 81 of file Engine.h.

◆ getClutch()

float RoR::Engine::getClutch ( ) const
inline

Definition at line 92 of file Engine.h.

+ Here is the caller graph for this function:

◆ getCrankFactor()

float Engine::getCrankFactor ( )

Definition at line 969 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getCurEngineTorque()

float RoR::Engine::getCurEngineTorque ( )
inline

Definition at line 103 of file Engine.h.

◆ getDriveRatio()

float RoR::Engine::getDriveRatio ( )
inline

Definition at line 105 of file Engine.h.

◆ getEnginePower() [1/2]

float RoR::Engine::getEnginePower ( )
inline

Definition at line 106 of file Engine.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEnginePower() [2/2]

float Engine::getEnginePower ( float  rpm)

Definition at line 1219 of file Engine.cpp.

+ Here is the call graph for this function:

◆ getGear()

int Engine::getGear ( )

Definition at line 1038 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getGearRange()

int Engine::getGearRange ( )

Definition at line 1049 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getGearRatio()

float Engine::getGearRatio ( int  pos)

-1=R, 0=N, 1... ('engine' attrs #5[R],#6[N],#7[1]...)

Definition at line 956 of file Engine.cpp.

◆ getIdleMixture()

float Engine::getIdleMixture ( )

Definition at line 1232 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getInputShaftRPM()

float RoR::Engine::getInputShaftRPM ( )
inline

Definition at line 104 of file Engine.h.

◆ getKickdownDelayCounter()

int RoR::Engine::getKickdownDelayCounter ( )
inline

Definition at line 125 of file Engine.h.

◆ getNumGears()

int RoR::Engine::getNumGears ( ) const
inline

Definition at line 62 of file Engine.h.

+ Here is the caller graph for this function:

◆ getNumGearsRanges()

int RoR::Engine::getNumGearsRanges ( ) const
inline

Definition at line 63 of file Engine.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPostShiftClock()

float RoR::Engine::getPostShiftClock ( )
inline

Definition at line 118 of file Engine.h.

◆ getPrimeMixture()

float Engine::getPrimeMixture ( )

Definition at line 1239 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRPM()

float RoR::Engine::getRPM ( )
inline

Definition at line 94 of file Engine.h.

+ Here is the caller graph for this function:

◆ getShifTargetGear()

int RoR::Engine::getShifTargetGear ( )
inline

Definition at line 122 of file Engine.h.

◆ getShiftClock()

float RoR::Engine::getShiftClock ( )
inline

Definition at line 119 of file Engine.h.

◆ getSmoke()

float Engine::getSmoke ( )

Definition at line 903 of file Engine.cpp.

◆ getTorque()

float Engine::getTorque ( )

Definition at line 913 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getTorqueCurve()

TorqueCurve* RoR::Engine::getTorqueCurve ( )
inline

Definition at line 86 of file Engine.h.

+ Here is the caller graph for this function:

◆ getTurboPower()

float Engine::getTurboPower ( )

Definition at line 1195 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTurboPSI()

float Engine::getTurboPSI ( )

Definition at line 857 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ getUpshiftDelayCounter()

int RoR::Engine::getUpshiftDelayCounter ( )
inline

Definition at line 124 of file Engine.h.

◆ hasAir()

bool RoR::Engine::hasAir ( ) const
inline

Definition at line 71 of file Engine.h.

◆ hasTurbo()

bool RoR::Engine::hasTurbo ( ) const
inline

Definition at line 72 of file Engine.h.

+ Here is the caller graph for this function:

◆ isElectric()

bool RoR::Engine::isElectric ( ) const
inline

Definition at line 70 of file Engine.h.

◆ isPostShifting()

bool RoR::Engine::isPostShifting ( )
inline

Definition at line 120 of file Engine.h.

◆ isRunning()

bool RoR::Engine::isRunning ( )
inline

Definition at line 101 of file Engine.h.

+ Here is the caller graph for this function:

◆ isShifting()

bool RoR::Engine::isShifting ( )
inline

Definition at line 121 of file Engine.h.

◆ offStart()

void Engine::offStart ( )

Quick start of vehicle engine.

Definition at line 1013 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ pushNetworkState()

void Engine::pushNetworkState ( float  engine_rpm,
float  acc,
float  clutch,
int  gear,
bool  running,
bool  contact,
char  auto_mode,
char  auto_select = -1 
)

Definition at line 885 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setAcc()

void Engine::setAcc ( float  val)

Definition at line 852 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setAutoMode()

void Engine::setAutoMode ( RoR::SimGearboxMode  mode)

Definition at line 847 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setClutch()

void RoR::Engine::setClutch ( float  clutch)
inline

Definition at line 133 of file Engine.h.

+ Here is the caller graph for this function:

◆ SetEngineOptions()

void Engine::SetEngineOptions ( float  einertia,
char  etype,
float  eclutch,
float  ctime,
float  stime,
float  pstime,
float  irpm,
float  srpm,
float  maximix,
float  minimix,
float  ebraking 
)

Definition at line 196 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setGear()

void Engine::setGear ( int  v)

low level gear changing (bypasses shifting logic)

Definition at line 1044 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setGearRange()

void Engine::setGearRange ( int  v)

low level gear changing (bypasses shifting logic)

Definition at line 1054 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setHydroPump()

void Engine::setHydroPump ( float  work)

Definition at line 928 of file Engine.cpp.

◆ setManualClutch()

void Engine::setManualClutch ( float  val)

Definition at line 1186 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setPrime()

void Engine::setPrime ( bool  p)

Definition at line 923 of file Engine.cpp.

◆ setRPM()

void Engine::setRPM ( float  rpm)

Definition at line 918 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setTCaseRatio()

void Engine::setTCaseRatio ( float  ratio)

Set current transfer case gear (reduction) ratio.

Definition at line 938 of file Engine.cpp.

◆ SetTurboOptions()

void Engine::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 
)

Definition at line 128 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ setWheelSpin()

void Engine::setWheelSpin ( float  rpm)

Definition at line 933 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ shift()

void Engine::shift ( int  val)

Changes gear by a relative offset. Plays sounds.

Definition at line 1084 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shiftTo()

void Engine::shiftTo ( int  val)

Changes gear to given value. Plays sounds.

Definition at line 1108 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startEngine()

void Engine::startEngine ( )

Quick engine start. Plays sounds.

Definition at line 995 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stopEngine()

void Engine::stopEngine ( )

stall engine

Definition at line 1059 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleAutoMode()

void Engine::toggleAutoMode ( )

Definition at line 817 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ toggleContact()

void Engine::toggleContact ( )

Ignition.

Definition at line 982 of file Engine.cpp.

+ Here is the caller graph for this function:

◆ UpdateEngine()

void Engine::UpdateEngine ( float  dt,
int  doUpdate 
)

Definition at line 258 of file Engine.cpp.

+ Here is the call graph for this function:

◆ UpdateEngineAudio()

void Engine::UpdateEngineAudio ( )

Definition at line 790 of file Engine.cpp.

◆ UpdateInputEvents()

void Engine::UpdateInputEvents ( float  dt)

Definition at line 1260 of file Engine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateShifts()

void Engine::updateShifts ( )

Changes gears. Plays sounds.

Definition at line 1113 of file Engine.cpp.

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Actor

friend class Actor
friend

Definition at line 44 of file Engine.h.

◆ ActorSpawner

friend class ActorSpawner
friend

Definition at line 43 of file Engine.h.

Field Documentation

◆ m_accs

std::deque<float> RoR::Engine::m_accs
private

Definition at line 252 of file Engine.h.

◆ m_actor

ActorPtr RoR::Engine::m_actor
private

Definition at line 186 of file Engine.h.

◆ m_air_pressure

float RoR::Engine::m_air_pressure
private

Definition at line 226 of file Engine.h.

◆ m_antilag_min_rpm

float RoR::Engine::m_antilag_min_rpm
private

Definition at line 273 of file Engine.h.

◆ m_antilag_power_factor

float RoR::Engine::m_antilag_power_factor
private

Definition at line 275 of file Engine.h.

◆ m_antilag_rand_chance

float RoR::Engine::m_antilag_rand_chance
private

Definition at line 274 of file Engine.h.

◆ m_auto_cur_acc

float RoR::Engine::m_auto_cur_acc
private

Definition at line 244 of file Engine.h.

◆ m_auto_mode

SimGearboxMode RoR::Engine::m_auto_mode
private

Definition at line 242 of file Engine.h.

◆ m_autoselect

autoswitch RoR::Engine::m_autoselect
private

Definition at line 243 of file Engine.h.

◆ m_brakes

std::deque<float> RoR::Engine::m_brakes
private

Definition at line 253 of file Engine.h.

◆ m_braking_torque

float RoR::Engine::m_braking_torque
private

Engine attribute.

Definition at line 209 of file Engine.h.

◆ m_clutch_force

float RoR::Engine::m_clutch_force
private

('engoption' attr #3)

Definition at line 197 of file Engine.h.

◆ m_clutch_time

float RoR::Engine::m_clutch_time
private

Time (in seconds) the clutch takes to apply ('engoption' attr #5)

Definition at line 198 of file Engine.h.

◆ m_contact

bool RoR::Engine::m_contact
private

Ignition switch is in ON/RUN position.

Definition at line 229 of file Engine.h.

◆ m_cur_acc

float RoR::Engine::m_cur_acc
private

Engine.

Definition at line 210 of file Engine.h.

◆ m_cur_clutch

float RoR::Engine::m_cur_clutch
private

Definition at line 199 of file Engine.h.

◆ m_cur_clutch_torque

float RoR::Engine::m_cur_clutch_torque
private

Definition at line 200 of file Engine.h.

◆ m_cur_engine_rpm

float RoR::Engine::m_cur_engine_rpm
private

Engine.

Definition at line 211 of file Engine.h.

◆ m_cur_engine_torque

float RoR::Engine::m_cur_engine_torque
private

Engine.

Definition at line 212 of file Engine.h.

◆ m_cur_gear

int RoR::Engine::m_cur_gear
private

Gears; Current gear {-1 = reverse, 0 = neutral, 1...21 = forward}.

Definition at line 191 of file Engine.h.

◆ m_cur_gear_range

int RoR::Engine::m_cur_gear_range
private

Gears.

Definition at line 192 of file Engine.h.

◆ m_cur_turbo_rpm

float RoR::Engine::m_cur_turbo_rpm[MAXTURBO]
private

Definition at line 258 of file Engine.h.

◆ m_cur_wheel_revolutions

float RoR::Engine::m_cur_wheel_revolutions
private

Gears; measured wheel revolutions.

Definition at line 190 of file Engine.h.

◆ m_diff_ratio

float RoR::Engine::m_diff_ratio
private

Global gear ratio ('engine' attr #4)

Definition at line 213 of file Engine.h.

◆ m_engine_addi_torque

float RoR::Engine::m_engine_addi_torque[MAXTURBO]
private

Definition at line 262 of file Engine.h.

◆ m_engine_has_air

bool RoR::Engine::m_engine_has_air
private

Engine attribute.

Definition at line 204 of file Engine.h.

◆ m_engine_has_turbo

bool RoR::Engine::m_engine_has_turbo
private

Engine attribute.

Definition at line 205 of file Engine.h.

◆ m_engine_idle_rpm

float RoR::Engine::m_engine_idle_rpm
private

('engoption' attr #8)

Definition at line 222 of file Engine.h.

◆ m_engine_inertia

float RoR::Engine::m_engine_inertia
private

('engoption' attr #1)

Definition at line 219 of file Engine.h.

◆ m_engine_is_electric

bool RoR::Engine::m_engine_is_electric
private

Engine attribute.

Definition at line 203 of file Engine.h.

◆ m_engine_is_priming

bool RoR::Engine::m_engine_is_priming
private

Engine.

Definition at line 224 of file Engine.h.

◆ m_engine_is_running

bool RoR::Engine::m_engine_is_running
private

Engine state.

Definition at line 207 of file Engine.h.

◆ m_engine_max_rpm

float RoR::Engine::m_engine_max_rpm
private

Shift up RPM ('engine' attr #2)

Definition at line 220 of file Engine.h.

◆ m_engine_shiftup_rpm

float RoR::Engine::m_engine_shiftup_rpm
private

Shift down RPM ('engine' attr #1)

Definition at line 221 of file Engine.h.

◆ m_engine_stall_rpm

float RoR::Engine::m_engine_stall_rpm
private

('engoption' attr #7)

Definition at line 223 of file Engine.h.

◆ m_engine_torque

float RoR::Engine::m_engine_torque
private

Torque in N/m ('engine' attr #3)

Definition at line 215 of file Engine.h.

◆ m_engine_turbo_mode

int RoR::Engine::m_engine_turbo_mode
private

Engine attribute.

Definition at line 206 of file Engine.h.

◆ m_engine_type

char RoR::Engine::m_engine_type
private

't' = truck (default), 'c' = car ('engoption' attr #2)

Definition at line 208 of file Engine.h.

◆ m_full_rpm_range

float RoR::Engine::m_full_rpm_range
private

Definition at line 245 of file Engine.h.

◆ m_gear_ratios

std::vector<float> RoR::Engine::m_gear_ratios
private

[R|N|1|...] ('engine' attrs #4[global],#5[R],#6[N],#7[1]...)

Definition at line 194 of file Engine.h.

◆ m_half_rpm_range

float RoR::Engine::m_half_rpm_range
private

Definition at line 247 of file Engine.h.

◆ m_hydropump_state

float RoR::Engine::m_hydropump_state
private

Engine.

Definition at line 216 of file Engine.h.

◆ m_kickdown_delay_counter

int RoR::Engine::m_kickdown_delay_counter
private

Definition at line 250 of file Engine.h.

◆ m_max_idle_mixture

float RoR::Engine::m_max_idle_mixture
private

Maximum throttle to maintain the idle RPM ('engoption' attr #9)

Definition at line 218 of file Engine.h.

◆ m_max_turbo_rpm

int RoR::Engine::m_max_turbo_rpm
private

Definition at line 261 of file Engine.h.

◆ m_min_bov_psi

int RoR::Engine::m_min_bov_psi
private

Definition at line 266 of file Engine.h.

◆ m_min_idle_mixture

float RoR::Engine::m_min_idle_mixture
private

Minimum throttle to maintain the idle RPM ('engoption' attr #10)

Definition at line 217 of file Engine.h.

◆ m_min_wastegate_psi

float RoR::Engine::m_min_wastegate_psi
private

Definition at line 268 of file Engine.h.

◆ m_num_gears

int RoR::Engine::m_num_gears
private

Num. forward gears.

Definition at line 193 of file Engine.h.

◆ m_num_turbos

int RoR::Engine::m_num_turbos
private

Definition at line 260 of file Engine.h.

◆ m_one_third_rpm_range

float RoR::Engine::m_one_third_rpm_range
private

Definition at line 246 of file Engine.h.

◆ m_post_shift_clock

float RoR::Engine::m_post_shift_clock
private

Definition at line 234 of file Engine.h.

◆ m_post_shift_time

float RoR::Engine::m_post_shift_time
private

Time (in seconds) until full torque is transferred ('engoption' attr #6)

Definition at line 233 of file Engine.h.

◆ m_post_shifting

int RoR::Engine::m_post_shifting
private

Definition at line 237 of file Engine.h.

◆ m_ref_wheel_revolutions

float RoR::Engine::m_ref_wheel_revolutions
private

Gears; estimated wheel revolutions based on current vehicle speed along the longi. axis.

Definition at line 189 of file Engine.h.

◆ m_rpms

std::deque<float> RoR::Engine::m_rpms
private

Definition at line 251 of file Engine.h.

◆ m_shift_behaviour

float RoR::Engine::m_shift_behaviour
private

Definition at line 248 of file Engine.h.

◆ m_shift_clock

float RoR::Engine::m_shift_clock
private

Definition at line 236 of file Engine.h.

◆ m_shift_time

float RoR::Engine::m_shift_time
private

Time (in seconds) that it takes to shift ('engoption' attr #4)

Definition at line 235 of file Engine.h.

◆ m_shift_val

int RoR::Engine::m_shift_val
private

Definition at line 239 of file Engine.h.

◆ m_shifting

int RoR::Engine::m_shifting
private

Definition at line 238 of file Engine.h.

◆ m_starter

bool RoR::Engine::m_starter
private

Ignition switch is in START position.

Definition at line 230 of file Engine.h.

◆ m_tcase_ratio

float RoR::Engine::m_tcase_ratio
private

Engine.

Definition at line 214 of file Engine.h.

◆ m_torque_curve

TorqueCurve* RoR::Engine::m_torque_curve
private

Definition at line 225 of file Engine.h.

◆ m_turbo_bov_rpm

float RoR::Engine::m_turbo_bov_rpm[MAXTURBO]
private

Definition at line 265 of file Engine.h.

◆ m_turbo_engine_rpm_operation

float RoR::Engine::m_turbo_engine_rpm_operation
private

Definition at line 263 of file Engine.h.

◆ m_turbo_flutters

bool RoR::Engine::m_turbo_flutters
private

Definition at line 269 of file Engine.h.

◆ m_turbo_has_antilag

bool RoR::Engine::m_turbo_has_antilag
private

Definition at line 272 of file Engine.h.

◆ m_turbo_has_bov

bool RoR::Engine::m_turbo_has_bov
private

Definition at line 264 of file Engine.h.

◆ m_turbo_has_wastegate

bool RoR::Engine::m_turbo_has_wastegate
private

Definition at line 267 of file Engine.h.

◆ m_turbo_inertia_factor

float RoR::Engine::m_turbo_inertia_factor
private

Definition at line 259 of file Engine.h.

◆ m_turbo_ver

int RoR::Engine::m_turbo_ver
private

Definition at line 257 of file Engine.h.

◆ m_turbo_wg_threshold_n

float RoR::Engine::m_turbo_wg_threshold_n
private

Definition at line 271 of file Engine.h.

◆ m_turbo_wg_threshold_p

float RoR::Engine::m_turbo_wg_threshold_p
private

Definition at line 270 of file Engine.h.

◆ m_upshift_delay_counter

int RoR::Engine::m_upshift_delay_counter
private

Definition at line 249 of file Engine.h.


The documentation for this class was generated from the following files: