![]() |
Rigs of Rods 2026.01
Soft-body Physics Simulation
|
Inheritance diagram for RoR::Engine:Public Types | |
| enum | autoswitch |
| enum | turbomode |
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 | getShiftDownRPM () const |
| float | getShiftUpRPM () const |
| float | getEngineTorque () const |
| float | getDiffRatio () const |
| float | getGearRatio (int pos) |
| int | getNumGears () const |
| int | getNumGearsRanges () const |
Definition, Keyword 'engoption' | |
| float | getEngineInertia () const |
| char | getEngineType () const |
| bool | isElectric () const |
| bool | hasAir () const |
| bool | hasTurbo () const |
| float | getClutchForce () const |
| float | getShiftTime () const |
| float | getClutchTime () const |
| float | getPostShiftTime () const |
| float | getStallRPM () const |
| float | getIdleRPM () const |
| float | getMaxIdleMixture () const |
| float | getMinIdleMixture () const |
| float | getBrakingTorque () const |
Definition, Keyword 'torquecurve' | |
| TorqueCurve * | getTorqueCurve () |
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 () |
| bool | hasContact () |
| float | getCurEngineTorque () |
| float | getInputShaftRPM () |
| float | getDriveRatio () |
| float | getEnginePower () |
| float | getEnginePower (float rpm) |
| float | getTurboPower () |
| float | getIdleMixture () |
| float | getPrimeMixture () |
| int | getAutoShift () |
| float | getAccToHoldRPM () |
| float | getWheelSpin () const |
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) |
| void | toggleContact () |
| void | offStart () |
| void | startEngine () |
| void | stopEngine () |
Shifting | |
| void | toggleAutoMode () |
| void | autoShiftDown () |
| void | autoShiftSet (int mode) |
| void | autoShiftUp () |
| void | setGear (int v) |
| void | setGearRange (int v) |
| void | shift (int val) |
| void | shiftTo (int val) |
Updates | |
| void | updateShifts () |
| 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 () |
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) |
| static void | RegisterRefCountingObjectGeneric (AS_NAMESPACE_QUALIFIER asIScriptEngine *engine, const char *name) |
| static void | AddRefGeneric (AS_NAMESPACE_QUALIFIER asIScriptGeneric *gen) |
| static void | ReleaseGeneric (AS_NAMESPACE_QUALIFIER asIScriptGeneric *gen) |
Data Fields inherited from RefCountingObject< Engine > | |
| int | m_refcount |
| std::mutex | m_refcount_mtx |
| 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 | ( | ) |
Definition at line 121 of file Engine.cpp.
| void Engine::autoSetAcc | ( | float | val | ) |
Definition at line 1085 of file Engine.cpp.
| void Engine::autoShiftDown | ( | ) |
Definition at line 1181 of file Engine.cpp.
| void Engine::autoShiftSet | ( | int | mode | ) |
Definition at line 1164 of file Engine.cpp.
| void Engine::autoShiftUp | ( | ) |
Definition at line 1172 of file Engine.cpp.
| float Engine::getAcc | ( | ) |
Definition at line 890 of file Engine.cpp.
| float Engine::getAccToHoldRPM | ( | ) |
estimate required throttle input to hold the current rpm
Definition at line 1079 of file Engine.cpp.
| RoR::SimGearboxMode Engine::getAutoMode | ( | ) |
Definition at line 852 of file Engine.cpp.
| int Engine::getAutoShift | ( | ) |
Definition at line 1191 of file Engine.cpp.
|
inline |
|
inline |
| float Engine::getCrankFactor | ( | ) |
Definition at line 979 of file Engine.cpp.
|
inline |
|
inline |
| float Engine::getEnginePower | ( | float | rpm | ) |
Definition at line 1229 of file Engine.cpp.
|
inline |
|
inline |
| int Engine::getGear | ( | ) |
Definition at line 1048 of file Engine.cpp.
| int Engine::getGearRange | ( | ) |
Definition at line 1059 of file Engine.cpp.
| float Engine::getGearRatio | ( | int | pos | ) |
-1=R, 0=N, 1... ('engine' attrs #5[R],#6[N],#7[1]...)
Definition at line 966 of file Engine.cpp.
| float Engine::getIdleMixture | ( | ) |
Definition at line 1242 of file Engine.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
| float Engine::getPrimeMixture | ( | ) |
Definition at line 1249 of file Engine.cpp.
|
inline |
|
inline |
|
inline |
| float Engine::getSmoke | ( | ) |
Definition at line 913 of file Engine.cpp.
|
inline |
| float Engine::getTorque | ( | ) |
Definition at line 923 of file Engine.cpp.
|
inline |
| float Engine::getTurboPower | ( | ) |
Definition at line 1205 of file Engine.cpp.
| float Engine::getTurboPSI | ( | ) |
Definition at line 867 of file Engine.cpp.
|
inline |
| void Engine::offStart | ( | ) |
Quick start of vehicle engine.
Definition at line 1023 of file Engine.cpp.
| 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 895 of file Engine.cpp.
| void Engine::setAcc | ( | float | val | ) |
Definition at line 862 of file Engine.cpp.
| void Engine::setAutoMode | ( | RoR::SimGearboxMode | mode | ) |
Definition at line 857 of file Engine.cpp.
| 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.
| void Engine::setGear | ( | int | v | ) |
low level gear changing (bypasses shifting logic)
Definition at line 1054 of file Engine.cpp.
| void Engine::setGearRange | ( | int | v | ) |
low level gear changing (bypasses shifting logic)
Definition at line 1064 of file Engine.cpp.
| void Engine::setHydroPump | ( | float | work | ) |
Definition at line 938 of file Engine.cpp.
| void Engine::setManualClutch | ( | float | val | ) |
Definition at line 1196 of file Engine.cpp.
| void Engine::setPrime | ( | bool | p | ) |
Definition at line 933 of file Engine.cpp.
| void Engine::setRPM | ( | float | rpm | ) |
Definition at line 928 of file Engine.cpp.
| void Engine::setTCaseRatio | ( | float | ratio | ) |
Set current transfer case gear (reduction) ratio.
Definition at line 948 of file Engine.cpp.
| 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.
| void Engine::setWheelSpin | ( | float | rpm | ) |
Definition at line 943 of file Engine.cpp.
| void Engine::shift | ( | int | val | ) |
Changes gear by a relative offset. Plays sounds.
Definition at line 1094 of file Engine.cpp.
| void Engine::shiftTo | ( | int | val | ) |
Changes gear to given value. Plays sounds.
Definition at line 1118 of file Engine.cpp.
| void Engine::startEngine | ( | ) |
Quick engine start. Plays sounds.
Definition at line 1005 of file Engine.cpp.
| void Engine::stopEngine | ( | ) |
stall engine
Definition at line 1069 of file Engine.cpp.
| void Engine::toggleAutoMode | ( | ) |
Definition at line 827 of file Engine.cpp.
| void Engine::toggleContact | ( | ) |
Ignition.
Definition at line 992 of file Engine.cpp.
| void Engine::UpdateEngine | ( | float | dt, |
| int | doUpdate | ||
| ) |
Definition at line 258 of file Engine.cpp.
| void Engine::UpdateEngineAudio | ( | ) |
Definition at line 800 of file Engine.cpp.
| void Engine::UpdateInputEvents | ( | float | dt | ) |
Definition at line 1270 of file Engine.cpp.
| void Engine::updateShifts | ( | ) |
Changes gears. Plays sounds.
Definition at line 1123 of file Engine.cpp.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |