scripting:components:wheeledsimulation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:components:wheeledsimulation [2022/08/09 23:45] – [WheelGetContactMaterial(int wheelIdx);] jerryhopper | scripting:components:wheeledsimulation [2022/08/10 00:24] (current) – [Common usage] jerryhopper | ||
---|---|---|---|
Line 4: | Line 4: | ||
Provides functionality for wheeled vehicles. | Provides functionality for wheeled vehicles. | ||
- | **class:** VehicleWheeledSimulation: | + | **class:** VehicleWheeledSimulation |
+ | |||
+ | **Parent Class:** VehicleBaseSimulation | ||
**Location: | **Location: | ||
Line 11: | Line 13: | ||
--- | --- | ||
+ | |||
+ | ===== Common usage ===== | ||
+ | |||
+ | |||
+ | wip | ||
+ | |||
+ | |||
===== Functions ===== | ===== Functions ===== | ||
Line 136: | Line 145: | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetRPMIdle(); ==== | + | ==== EngineGetRPMIdle() ==== |
+ | |||
+ | EngineGetRPMIdle(); | ||
Returns idle rpm of the engine | Returns idle rpm of the engine | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetRPMPeakTorque(); ==== | + | ==== EngineGetRPMPeakTorque() ==== |
+ | |||
+ | EngineGetRPMPeakTorque(); | ||
Returns rpm at which engine provides maximal torque | Returns rpm at which engine provides maximal torque | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetRPMPeakPower(); ==== | + | ==== EngineGetRPMPeakPower() ==== |
+ | |||
+ | EngineGetRPMPeakPower(); | ||
Returns rpm at which engine provides maximal power | Returns rpm at which engine provides maximal power | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetRPMMax(); ==== | + | ==== EngineGetRPMMax() ==== |
+ | |||
+ | EngineGetRPMMax(); | ||
Returns maximal working rpm before engine explodes | Returns maximal working rpm before engine explodes | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetRPM(); ==== | + | ==== EngineGetRPM() ==== |
+ | |||
+ | EngineGetRPM(); | ||
Returns current engine' | Returns current engine' | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetRPMFeedback(); ==== | + | ==== EngineGetRPMFeedback() ==== |
+ | |||
+ | EngineGetRPMFeedback(); | ||
Returns RPM that is feeded back from rest of the powertrain | Returns RPM that is feeded back from rest of the powertrain | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetLoad(); ==== | + | ==== EngineGetLoad() ==== |
+ | |||
+ | EngineGetLoad(); | ||
Returns current engine load in range < 0, 1 > | Returns current engine load in range < 0, 1 > | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetPeakTorque(); ==== | + | ==== EngineGetPeakTorque() ==== |
+ | |||
+ | EngineGetPeakTorque(); | ||
Returns initial engine' | Returns initial engine' | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetPeakTorqueState(); ==== | + | ==== EngineGetPeakTorqueState() ==== |
+ | |||
+ | EngineGetPeakTorqueState(); | ||
Returns current engine' | Returns current engine' | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineSetPeakTorqueState(float peakTorque); ==== | + | ==== EngineSetPeakTorqueState() ==== |
+ | |||
+ | EngineSetPeakTorqueState(float peakTorque); | ||
+ | | ||
Sets current engine' | Sets current engine' | ||
\param peakTorque must be in Nm (newton-metre). | \param peakTorque must be in Nm (newton-metre). | ||
Line 187: | Line 217: | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetPeakPower(); ==== | + | ==== EngineGetPeakPower() ==== |
+ | |||
+ | EngineGetPeakPower(); | ||
+ | | ||
Returns initial engine' | Returns initial engine' | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineGetPeakPowerState(); ==== | + | ==== EngineGetPeakPowerState() ==== |
+ | |||
+ | EngineGetPeakPowerState(); | ||
Returns current engine' | Returns current engine' | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== EngineSetPeakPowerState(float peakPower); ==== | + | ==== EngineSetPeakPowerState() ==== |
+ | |||
+ | EngineSetPeakPowerState(float peakPower); | ||
+ | | ||
Sets current engine' | Sets current engine' | ||
\param peakTorque must be in kW (kilowatts). | \param peakTorque must be in kW (kilowatts). | ||
Line 203: | Line 241: | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== GearboxGetEfficiency(); ==== | + | ==== GearboxGetEfficiency() ==== |
+ | |||
+ | GearboxGetEfficiency(); | ||
+ | | ||
Returns initial gearbox efficiency. | Returns initial gearbox efficiency. | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== GearboxGetEfficiencyState(); ==== | + | ==== GearboxGetEfficiencyState() ==== |
+ | |||
+ | GearboxGetEfficiencyState(); | ||
+ | | ||
Returns current gearbox efficiency. | Returns current gearbox efficiency. | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== GearboxSetEfficiencyState(float efficiency); ==== | + | ==== GearboxSetEfficiencyState() ==== |
+ | |||
+ | GearboxSetEfficiencyState(float efficiency); | ||
+ | | ||
Sets current gearbox efficiency. | Sets current gearbox efficiency. | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== GearboxGearsCount(); ==== | + | ==== GearboxGearsCount() ==== |
+ | |||
+ | GearboxGearsCount(); | ||
+ | | ||
Returns number of all gear ratios (neutral included). | Returns number of all gear ratios (neutral included). | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== GearboxForwardGearsCount(); ==== | + | ==== GearboxForwardGearsCount() ==== |
+ | |||
+ | GearboxForwardGearsCount(); | ||
+ | | ||
Returns number of forward gears. | Returns number of forward gears. | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== WheelCount(); ==== | + | ==== WheelCount() ==== |
+ | |||
+ | WheelCount(); | ||
+ | | ||
Returns number of wheels | Returns number of wheels | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== WheelGetIndex(string name); ==== | + | ==== WheelGetIndex() ==== |
+ | |||
+ | WheelGetIndex(string name); | ||
+ | | ||
Returns stored index of the wheel based on its name | Returns stored index of the wheel based on its name | ||
Line 241: | Line 300: | ||
- | ==== WheelGetPosition(int wheelIdx, float displacement = 0.0); ==== | + | ==== WheelGetPosition() ==== |
- | /*! | + | |
+ | | ||
+ | |||
Get the wheel position based on suspension. | Get the wheel position based on suspension. | ||
\param wheelIdx Index of the wheel | \param wheelIdx Index of the wheel | ||
\param displacement 0 means the position of the wheel when the suspension is fully extended ( zero g ). | \param displacement 0 means the position of the wheel when the suspension is fully extended ( zero g ). | ||
\return Returns wheel position in local space. | \return Returns wheel position in local space. | ||
- | */ | ||
Return Type: [[scripting: | Return Type: [[scripting: | ||
- | ==== WheelGetName(int wheelIdx); ==== | + | ==== WheelGetName() ==== |
+ | |||
+ | WheelGetName(int wheelIdx); | ||
+ | | ||
Returns name of the wheel based on its index | Returns name of the wheel based on its index | ||
Return Type: string | Return Type: string | ||
- | ==== WheelHasContact(int wheelIdx); ==== | + | ==== WheelHasContact() ==== |
+ | |||
+ | WheelHasContact(int wheelIdx); | ||
+ | |||
+ | | ||
Returns true if wheel has contact with ground or other object | Returns true if wheel has contact with ground or other object | ||
scripting/components/wheeledsimulation.1660085157.txt.gz · Last modified: 2022/08/09 23:45 by jerryhopper