Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
EngineClass.h
Go to the documentation of this file.
1
2namespace Script2Game {
3
17{
18public:
19
22 float getShiftDownRPM() const;
23 float getShiftUpRPM() const;
24 float getEngineTorque() const;
25 float getDiffRatio() const;
26 float getGearRatio(int pos);
27 int getNumGears() const;
28 int getNumGearsRanges() const;
30
33 float getEngineInertia() const;
34 char getEngineType() const;
35 bool isElectric() const;
36 bool hasAir() const;
37 bool hasTurbo() const;
38 float getClutchForce() const;
39 float getShiftTime() const;
40 float getClutchTime() const;
41 float getPostShiftTime() const;
42 float getStallRMP() const;
43 float getIdleRPM() const;
44 float getMaxIdleMixture() const;
45 float getMinIdleMixture() const;
46 float getBrakingTorque() const;
48
51 float getAcc();
52 float getClutch();
54 float getRPM();
55 float getSmoke();
56 float getTorque();
57 float getTurboPSI();
58 SimGearboxMode getAutoMode();
59 int getGear();
61 bool isRunning();
62 bool hasContact();
67 float getEnginePower(float rpm);
73 float getWheelSpin();
75
81 bool isShifting();
87
90 void pushNetworkState(float engine_rpm, float acc, float clutch, int gear, bool running, bool contact, char auto_mode, char auto_select = -1);
91 void setAcc(float val);
92 void autoSetAcc(float val);
93 void setClutch(float clutch);
94 void setRPM(float rpm);
95 void setWheelSpin(float rpm);
96 void setAutoMode(SimGearboxMode mode);
97 void setPrime(bool p);
98 void setHydroPump(float work);
99 void setManualClutch(float val);
100 void setTCaseRatio(float ratio);
102 void offStart();
103 void startEngine();
104 void stopEngine();
106
113 void setGear(int v);
114 void setGearRange(int v);
115 void shift(int val);
116 void shiftTo(int val);
118
119};
120
123
124} //namespace Script2Game
Binding of RoR::EngineSim; A land vehicle engine + transmission.
Definition EngineClass.h:17
void autoShiftSet(autoswitch mode)
void setTCaseRatio(float ratio)
Set current transfer case gear (reduction) ratio.
void shiftTo(int val)
Changes gear to given value. Plays sounds.
SimGearboxMode getAutoMode()
void startEngine()
Quick engine start. Plays sounds.
float getIdleRPM() const
('engoption' attr #8)
float getAccToHoldRPM()
estimate required throttle input to hold the current rpm
void setClutch(float clutch)
void setManualClutch(float val)
char getEngineType() const
't' = truck (default), 'c' = car, 'e' = electric car ('engoption' attr #2)
float getEngineTorque() const
Torque in N/m ('engine' attr #3)
float getShiftTime() const
Time (in seconds) that it takes to shift ('engoption' attr #4)
float getGearRatio(int pos)
-1=R, 0=N, 1... ('engine' attrs #5[R],#6[N],#7[1]...)
void setGear(int v)
low level gear changing (bypasses shifting logic)
float getPostShiftTime() const
Time (in seconds) until full torque is transferred ('engoption' attr #6)
float getClutchTime() const
Time (in seconds) the clutch takes to apply ('engoption' attr #5)
float getClutchForce() const
('engoption' attr #3)
float getBrakingTorque() const
float getDiffRatio() const
Global gear ratio ('engine' attr #4)
float getWheelSpin()
Current wheel RPM.
float getEngineInertia() const
('engoption' attr #1)
void stopEngine()
stall engine
void setWheelSpin(float rpm)
float getMaxIdleMixture() const
Maximum throttle to maintain the idle RPM ('engoption' attr #9)
void setAutoMode(SimGearboxMode mode)
bool hasContact()
Ignition.
void setGearRange(int v)
low level gear changing (bypasses shifting logic)
void shift(int val)
Changes gear by a relative offset. Plays sounds.
void setHydroPump(float work)
void toggleContact()
Ignition.
float getShiftDownRPM() const
Shift down RPM ('engine' attr #1)
float getMinIdleMixture() const
Minimum throttle to maintain the idle RPM ('engoption' attr #10)
float getShiftUpRPM() const
Shift up RPM ('engine' attr #2)
float getEnginePower(float rpm)
void offStart()
Quick start of vehicle engine.
void autoSetAcc(float val)
void pushNetworkState(float engine_rpm, float acc, float clutch, int gear, bool running, bool contact, char auto_mode, char auto_select=-1)
float getStallRMP() const
('engoption' attr #7)
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
autoswitch
Binding of RoR::autoswitch, used with Script2Game::EngineClass.
Definition autoswitch.h:20