 |
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
48 Engine(
float min_rpm,
float max_rpm,
float torque,
float reverse_gear,
float neutral_gear, std::vector<float> gears,
float dratio,
ActorPtr actor);
52 void SetEngineOptions(
float einertia,
char etype,
float eclutch,
float ctime,
float stime,
float pstime,
float irpm,
float srpm,
float maximix,
float minimix,
float ebraking);
53 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);
130 void pushNetworkState(
float engine_rpm,
float acc,
float clutch,
int gear,
bool running,
bool contact,
char auto_mode,
char auto_select = -1);
void toggleContact()
Ignition.
void autoShiftSet(int mode)
bool m_contact
Ignition switch is in ON/RUN position.
Softbody object; can be anything from soda can to a space shuttle Constructed from a truck definition...
Engine(float min_rpm, float max_rpm, float torque, float reverse_gear, float neutral_gear, std::vector< float > gears, float dratio, ActorPtr actor)
float m_cur_engine_torque
Engine.
void setGearRange(int v)
low level gear changing (bypasses shifting logic)
float m_turbo_wg_threshold_n
float getGearRatio(int pos)
-1=R, 0=N, 1... ('engine' attrs #5[R],#6[N],#7[1]...)
void SetEngineOptions(float einertia, char etype, float eclutch, float ctime, float stime, float pstime, float irpm, float srpm, float maximix, float minimix, float ebraking)
TorqueCurve * getTorqueCurve()
void setGear(int v)
low level gear changing (bypasses shifting logic)
float m_cur_turbo_rpm[MAXTURBO]
SimGearboxMode getAutoMode()
TorqueCurve * m_torque_curve
bool m_engine_is_priming
Engine.
int getKickdownDelayCounter()
int m_engine_turbo_mode
Engine attribute.
float m_min_idle_mixture
Minimum throttle to maintain the idle RPM ('engoption' attr #10)
float m_braking_torque
Engine attribute.
bool m_turbo_has_wastegate
float m_turbo_inertia_factor
void shift(int val)
Changes gear by a relative offset. Plays sounds.
float m_min_wastegate_psi
This class loads and processes a torque curve for a vehicle.
float m_engine_stall_rpm
('engoption' attr #7)
float m_one_third_rpm_range
void UpdateEngine(float dt, int doUpdate)
void pushNetworkState(float engine_rpm, float acc, float clutch, int gear, bool running, bool contact, char auto_mode, char auto_select=-1)
float m_turbo_bov_rpm[MAXTURBO]
void setAutoMode(SimGearboxMode mode)
void shiftTo(int val)
Changes gear to given value. Plays sounds.
float m_max_idle_mixture
Maximum throttle to maintain the idle RPM ('engoption' attr #9)
float m_shift_time
Time (in seconds) that it takes to shift ('engoption' attr #4)
float m_turbo_wg_threshold_p
Processes a RigDef::Document (parsed from 'truck' file format) into a simulated gameplay object (Acto...
float m_cur_engine_rpm
Engine.
A land vehicle engine + transmission.
float m_ref_wheel_revolutions
Gears; estimated wheel revolutions based on current vehicle speed along the longi....
void setWheelSpin(float rpm)
float m_antilag_power_factor
void offStart()
Quick start of vehicle engine.
int m_kickdown_delay_counter
float m_clutch_time
Time (in seconds) the clutch takes to apply ('engoption' attr #5)
float getCurEngineTorque()
std::deque< float > m_accs
void updateShifts()
Changes gears. Plays sounds.
std::deque< float > m_rpms
int getNumGearsRanges() const
bool m_engine_has_turbo
Engine attribute.
void autoSetAcc(float val)
float m_diff_ratio
Global gear ratio ('engine' attr #4)
Central state/object manager and communications hub.
float m_engine_torque
Torque in N/m ('engine' attr #3)
float m_cur_wheel_revolutions
Gears; measured wheel revolutions.
std::deque< float > m_brakes
void setHydroPump(float work)
void setTCaseRatio(float ratio)
Set current transfer case gear (reduction) ratio.
float m_engine_idle_rpm
('engoption' attr #8)
char m_engine_type
't' = truck (default), 'c' = car ('engoption' attr #2)
float m_turbo_engine_rpm_operation
void setClutch(float clutch)
float m_engine_max_rpm
Shift up RPM ('engine' attr #2)
void stopEngine()
stall engine
float m_engine_inertia
('engoption' attr #1)
int m_upshift_delay_counter
float m_engine_addi_torque[MAXTURBO]
bool m_engine_is_electric
Engine attribute.
float m_tcase_ratio
Engine.
void UpdateInputEvents(float dt)
int m_cur_gear
Gears; Current gear {-1 = reverse, 0 = neutral, 1...21 = forward}.
int getUpshiftDelayCounter()
bool m_starter
Ignition switch is in START position.
SimGearboxMode m_auto_mode
bool m_engine_is_running
Engine state.
float getAccToHoldRPM()
estimate required throttle input to hold the current rpm
float m_cur_clutch_torque
float getAutoShiftBehavior()
float getBrakingTorque() const
float m_hydropump_state
Engine.
std::vector< float > m_gear_ratios
[R|N|1|...] ('engine' attrs #4[global],#5[R],#6[N],#7[1]...)
Self reference-counting objects, as requred by AngelScript garbage collector.
float m_clutch_force
('engoption' attr #3)
bool m_engine_has_air
Engine attribute.
int m_cur_gear_range
Gears.
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)
void setManualClutch(float val)
void startEngine()
Quick engine start. Plays sounds.
float m_post_shift_time
Time (in seconds) until full torque is transferred ('engoption' attr #6)
float getPostShiftClock()
float m_antilag_rand_chance
float m_engine_shiftup_rpm
Shift down RPM ('engine' attr #1)
int m_num_gears
Num. forward gears.