RigsofRods
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Script2Game::EngineSimClass Class Reference

Binding of RoR::EngineSim; A land vehicle engine + transmission. More...

#include <EngineClass.h>

Public Member Functions

Definition; keyword 'engine'
float getShiftDownRPM () const
 Shift down RPM ('engine' attr #1) More...
 
float getShiftUpRPM () const
 Shift up RPM ('engine' attr #2) More...
 
float getEngineTorque () const
 Torque in N/m ('engine' attr #3) More...
 
float getDiffRatio () const
 Global gear ratio ('engine' attr #4) More...
 
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'
float getEngineInertia () const
 ('engoption' attr #1) More...
 
char getEngineType () const
 't' = truck (default), 'c' = car, 'e' = electric car ('engoption' attr #2) More...
 
bool isElectric () const
 
bool hasAir () const
 
bool hasTurbo () const
 
float getClutchForce () const
 ('engoption' attr #3) More...
 
float getShiftTime () const
 Time (in seconds) that it takes to shift ('engoption' attr #4) More...
 
float getClutchTime () const
 Time (in seconds) the clutch takes to apply ('engoption' attr #5) More...
 
float getPostShiftTime () const
 Time (in seconds) until full torque is transferred ('engoption' attr #6) More...
 
float getStallRMP () const
 ('engoption' attr #7) More...
 
float getIdleRPM () const
 ('engoption' attr #8) More...
 
float getMaxIdleMixture () const
 Maximum throttle to maintain the idle RPM ('engoption' attr #9) More...
 
float getMinIdleMixture () const
 Minimum throttle to maintain the idle RPM ('engoption' attr #10) More...
 
float getBrakingTorque () const
 
General state getters
float getAcc ()
 
float getClutch ()
 
float getCrankFactor ()
 
float getRPM ()
 
float getSmoke ()
 
float getTorque ()
 
float getTurboPSI ()
 
SimGearboxMode getAutoMode ()
 
int getGear ()
 
int getGearRange ()
 
bool isRunning ()
 
bool hasContact ()
 Ignition. More...
 
float getEngineTorque ()
 
float getInputShaftRPM ()
 
float getDriveRatio ()
 
float getEnginePower ()
 
float getEnginePower (float rpm)
 
float getTurboPower ()
 
float getIdleMixture ()
 
float getPrimeMixture ()
 
autoswitch getAutoShift ()
 
float getAccToHoldRPM ()
 estimate required throttle input to hold the current rpm More...
 
float getWheelSpin ()
 Current wheel 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 (autoswitch 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...
 

Detailed Description

Binding of RoR::EngineSim; A land vehicle engine + transmission.

Note
Obtain the object using BeamClass::getEngine().

Definition at line 26 of file EngineClass.h.

Member Function Documentation

◆ autoSetAcc()

void Script2Game::EngineSimClass::autoSetAcc ( float  val)

◆ autoShiftDown()

void Script2Game::EngineSimClass::autoShiftDown ( )

◆ autoShiftSet()

void Script2Game::EngineSimClass::autoShiftSet ( autoswitch  mode)

◆ autoShiftUp()

void Script2Game::EngineSimClass::autoShiftUp ( )

◆ getAcc()

float Script2Game::EngineSimClass::getAcc ( )

◆ getAccToHoldRPM()

float Script2Game::EngineSimClass::getAccToHoldRPM ( )

estimate required throttle input to hold the current rpm

◆ getAutoMode()

SimGearboxMode Script2Game::EngineSimClass::getAutoMode ( )

◆ getAutoShift()

autoswitch Script2Game::EngineSimClass::getAutoShift ( )

◆ getAutoShiftBehavior()

float Script2Game::EngineSimClass::getAutoShiftBehavior ( )

◆ getBrakingTorque()

float Script2Game::EngineSimClass::getBrakingTorque ( ) const

◆ getClutch()

float Script2Game::EngineSimClass::getClutch ( )

◆ getClutchForce()

float Script2Game::EngineSimClass::getClutchForce ( ) const

('engoption' attr #3)

◆ getClutchTime()

float Script2Game::EngineSimClass::getClutchTime ( ) const

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

◆ getCrankFactor()

float Script2Game::EngineSimClass::getCrankFactor ( )

◆ getDiffRatio()

float Script2Game::EngineSimClass::getDiffRatio ( ) const

Global gear ratio ('engine' attr #4)

◆ getDriveRatio()

float Script2Game::EngineSimClass::getDriveRatio ( )

◆ getEngineInertia()

float Script2Game::EngineSimClass::getEngineInertia ( ) const

('engoption' attr #1)

◆ getEnginePower() [1/2]

float Script2Game::EngineSimClass::getEnginePower ( )

◆ getEnginePower() [2/2]

float Script2Game::EngineSimClass::getEnginePower ( float  rpm)

◆ getEngineTorque() [1/2]

float Script2Game::EngineSimClass::getEngineTorque ( )

◆ getEngineTorque() [2/2]

float Script2Game::EngineSimClass::getEngineTorque ( ) const

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

◆ getEngineType()

char Script2Game::EngineSimClass::getEngineType ( ) const

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

◆ getGear()

int Script2Game::EngineSimClass::getGear ( )

◆ getGearRange()

int Script2Game::EngineSimClass::getGearRange ( )

◆ getGearRatio()

float Script2Game::EngineSimClass::getGearRatio ( int  pos)

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

◆ getIdleMixture()

float Script2Game::EngineSimClass::getIdleMixture ( )

◆ getIdleRPM()

float Script2Game::EngineSimClass::getIdleRPM ( ) const

('engoption' attr #8)

◆ getInputShaftRPM()

float Script2Game::EngineSimClass::getInputShaftRPM ( )

◆ getKickdownDelayCounter()

int Script2Game::EngineSimClass::getKickdownDelayCounter ( )

◆ getMaxIdleMixture()

float Script2Game::EngineSimClass::getMaxIdleMixture ( ) const

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

◆ getMinIdleMixture()

float Script2Game::EngineSimClass::getMinIdleMixture ( ) const

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

◆ getNumGears()

int Script2Game::EngineSimClass::getNumGears ( ) const

◆ getNumGearsRanges()

int Script2Game::EngineSimClass::getNumGearsRanges ( ) const

◆ getPostShiftClock()

float Script2Game::EngineSimClass::getPostShiftClock ( )

◆ getPostShiftTime()

float Script2Game::EngineSimClass::getPostShiftTime ( ) const

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

◆ getPrimeMixture()

float Script2Game::EngineSimClass::getPrimeMixture ( )

◆ getRPM()

float Script2Game::EngineSimClass::getRPM ( )

◆ getShifTargetGear()

int Script2Game::EngineSimClass::getShifTargetGear ( )

◆ getShiftClock()

float Script2Game::EngineSimClass::getShiftClock ( )

◆ getShiftDownRPM()

float Script2Game::EngineSimClass::getShiftDownRPM ( ) const

Shift down RPM ('engine' attr #1)

◆ getShiftTime()

float Script2Game::EngineSimClass::getShiftTime ( ) const

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

◆ getShiftUpRPM()

float Script2Game::EngineSimClass::getShiftUpRPM ( ) const

Shift up RPM ('engine' attr #2)

◆ getSmoke()

float Script2Game::EngineSimClass::getSmoke ( )

◆ getStallRMP()

float Script2Game::EngineSimClass::getStallRMP ( ) const

('engoption' attr #7)

◆ getTorque()

float Script2Game::EngineSimClass::getTorque ( )

◆ getTurboPower()

float Script2Game::EngineSimClass::getTurboPower ( )

◆ getTurboPSI()

float Script2Game::EngineSimClass::getTurboPSI ( )

◆ getUpshiftDelayCounter()

int Script2Game::EngineSimClass::getUpshiftDelayCounter ( )

◆ getWheelSpin()

float Script2Game::EngineSimClass::getWheelSpin ( )

Current wheel RPM.

◆ hasAir()

bool Script2Game::EngineSimClass::hasAir ( ) const

◆ hasContact()

bool Script2Game::EngineSimClass::hasContact ( )

Ignition.

◆ hasTurbo()

bool Script2Game::EngineSimClass::hasTurbo ( ) const

◆ isElectric()

bool Script2Game::EngineSimClass::isElectric ( ) const

◆ isPostShifting()

bool Script2Game::EngineSimClass::isPostShifting ( )

◆ isRunning()

bool Script2Game::EngineSimClass::isRunning ( )

◆ isShifting()

bool Script2Game::EngineSimClass::isShifting ( )

◆ offStart()

void Script2Game::EngineSimClass::offStart ( )

Quick start of vehicle engine.

◆ pushNetworkState()

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

◆ setAcc()

void Script2Game::EngineSimClass::setAcc ( float  val)

◆ setAutoMode()

void Script2Game::EngineSimClass::setAutoMode ( SimGearboxMode  mode)

◆ setClutch()

void Script2Game::EngineSimClass::setClutch ( float  clutch)

◆ setGear()

void Script2Game::EngineSimClass::setGear ( int  v)

low level gear changing (bypasses shifting logic)

◆ setGearRange()

void Script2Game::EngineSimClass::setGearRange ( int  v)

low level gear changing (bypasses shifting logic)

◆ setHydroPump()

void Script2Game::EngineSimClass::setHydroPump ( float  work)

◆ setManualClutch()

void Script2Game::EngineSimClass::setManualClutch ( float  val)

◆ setPrime()

void Script2Game::EngineSimClass::setPrime ( bool  p)

◆ setRPM()

void Script2Game::EngineSimClass::setRPM ( float  rpm)

◆ setTCaseRatio()

void Script2Game::EngineSimClass::setTCaseRatio ( float  ratio)

Set current transfer case gear (reduction) ratio.

◆ setWheelSpin()

void Script2Game::EngineSimClass::setWheelSpin ( float  rpm)

◆ shift()

void Script2Game::EngineSimClass::shift ( int  val)

Changes gear by a relative offset. Plays sounds.

◆ shiftTo()

void Script2Game::EngineSimClass::shiftTo ( int  val)

Changes gear to given value. Plays sounds.

◆ startEngine()

void Script2Game::EngineSimClass::startEngine ( )

Quick engine start. Plays sounds.

◆ stopEngine()

void Script2Game::EngineSimClass::stopEngine ( )

stall engine

◆ toggleAutoMode()

void Script2Game::EngineSimClass::toggleAutoMode ( )

◆ toggleContact()

void Script2Game::EngineSimClass::toggleContact ( )

Ignition.


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