PxVehicleDriveDynData Class Reference
[Vehicle]
Data structure with instanced dynamics data for vehicle with engine, clutch, gears, autobox.
More...
#include <PxVehicleDrive.h>
Public Types | |
enum | { eANALOG_INPUT_ACCEL = 0, eMAX_NUM_ANALOG_INPUTS = 16 } |
Public Member Functions | |
PxVehicleDriveDynData () | |
void | setToRestState () |
Set all dynamics data to zero to bring the vehicle to rest. | |
void | setAnalogInput (const PxReal analogVal, const PxU32 type) |
Set an analog control value to drive the vehicle. | |
PxReal | getAnalogInput (const PxU32 type) |
Get the analog control value that has been applied to the vehicle. | |
void | setGearUp (const bool digitalVal) |
Set that the gearup button has been pressed. | |
void | setGearDown (const bool digitalVal) |
Set that the geardown button has been pressed. | |
bool | getGearUp () const |
Check if the gearup button has been pressed. | |
bool | getGearDown () const |
Check if the geardown button has been pressed. | |
PX_FORCE_INLINE bool | getUseAutoGears () const |
Get the flag status that is used to select auto-gears. | |
PX_FORCE_INLINE void | toggleAutoGears () |
Toggle the autogears flag. | |
PX_FORCE_INLINE PxU32 | getCurrentGear () const |
Get the current gear. | |
PX_FORCE_INLINE PxU32 | getTargetGear () const |
Get the target gear. | |
PX_FORCE_INLINE void | startGearChange (const PxU32 targetGear) |
Start a gear change to a target gear. | |
PX_FORCE_INLINE void | forceGearChange (const PxU32 targetGear) |
Force an immediate gear change to a target gear. | |
PX_FORCE_INLINE PxReal | getEngineRotationSpeed () const |
Return the rotation speed of the engine. | |
PX_FORCE_INLINE void | setUseAutoGears (const bool useAutoGears) |
Set the flag that will be used to select auto-gears. | |
Public Attributes | |
PxReal | mControlAnalogVals [eMAX_NUM_ANALOG_INPUTS] |
All dynamic data values are public for fast access. | |
bool | mUseAutoGears |
Autogear flag used by vehicle simulation. Set true to enable the autobox, false to disable the autobox. | |
bool | mGearUpPressed |
Gearup digital control value used by vehicle simulation. If true a gear change will be initiated towards currentGear+1 (or to first gear if in reverse). | |
bool | mGearDownPressed |
Geardown digital control value used by vehicle simulation. If true a gear change will be initiated towards currentGear-1 (or to reverse if in first). | |
PxU32 | mCurrentGear |
Current gear. | |
PxU32 | mTargetGear |
Target gear (different from current gear if a gear change is underway). | |
PxReal | mEnginespeed |
Rotation speed of engine. | |
PxReal | mGearSwitchTime |
Reported time that has passed since gear change started. | |
PxReal | mAutoBoxSwitchTime |
Reported time that has passed since last autobox gearup/geardown decision. | |
Private Member Functions | |
bool | isValid () const |
Test that a PxVehicleDriveDynData instance has legal values. | |
Private Attributes | |
PxU32 | mPad [2] |
Friends | |
class | PxVehicleDrive |
Detailed Description
Data structure with instanced dynamics data for vehicle with engine, clutch, gears, autobox.
- See also:
- PxVehicleWheelsDynData for wheels dynamics data.
Member Enumeration Documentation
Constructor & Destructor Documentation
PxVehicleDriveDynData::PxVehicleDriveDynData | ( | ) |
Member Function Documentation
PX_FORCE_INLINE void PxVehicleDriveDynData::forceGearChange | ( | const PxU32 | targetGear | ) | [inline] |
Force an immediate gear change to a target gear.
Get the analog control value that has been applied to the vehicle.
PX_FORCE_INLINE PxU32 PxVehicleDriveDynData::getCurrentGear | ( | ) | const [inline] |
Get the current gear.
PX_FORCE_INLINE PxReal PxVehicleDriveDynData::getEngineRotationSpeed | ( | ) | const [inline] |
Return the rotation speed of the engine.
bool PxVehicleDriveDynData::getGearDown | ( | ) | const [inline] |
Check if the geardown button has been pressed.
bool PxVehicleDriveDynData::getGearUp | ( | ) | const [inline] |
Check if the gearup button has been pressed.
PX_FORCE_INLINE PxU32 PxVehicleDriveDynData::getTargetGear | ( | ) | const [inline] |
Get the target gear.
PX_FORCE_INLINE bool PxVehicleDriveDynData::getUseAutoGears | ( | ) | const [inline] |
Get the flag status that is used to select auto-gears.
bool PxVehicleDriveDynData::isValid | ( | ) | const [private] |
Set an analog control value to drive the vehicle.
void PxVehicleDriveDynData::setGearDown | ( | const bool | digitalVal | ) | [inline] |
Set that the geardown button has been pressed.
void PxVehicleDriveDynData::setGearUp | ( | const bool | digitalVal | ) | [inline] |
Set that the gearup button has been pressed.
void PxVehicleDriveDynData::setToRestState | ( | ) |
Set all dynamics data to zero to bring the vehicle to rest.
PX_FORCE_INLINE void PxVehicleDriveDynData::setUseAutoGears | ( | const bool | useAutoGears | ) | [inline] |
Set the flag that will be used to select auto-gears.
PX_FORCE_INLINE void PxVehicleDriveDynData::startGearChange | ( | const PxU32 | targetGear | ) | [inline] |
Start a gear change to a target gear.
PX_FORCE_INLINE void PxVehicleDriveDynData::toggleAutoGears | ( | ) | [inline] |
Toggle the autogears flag.
Friends And Related Function Documentation
friend class PxVehicleDrive [friend] |
Member Data Documentation
PxReal PxVehicleDriveDynData::mControlAnalogVals[eMAX_NUM_ANALOG_INPUTS] |
All dynamic data values are public for fast access.
Analog control values used by vehicle simulation. Accelerator pedal value used for vehicle simulation is equal to mControlAnalogVals[eVEHICLE_ANALOG_INPUT_ACCEL]. Brake pedal value used by vehicle simulation is equal to mControlAnalogVals[eVEHICLE_ANALOG_INPUT_BRAKE]. Handbrake value used by vehicle simulation is equal to mControlAnalogVals[eVEHICLE_ANALOG_INPUT_HANDBRAKE]. Steer value used by vehicle simulation is equal to mControlAnalogVals[eVEHICLE_ANALOG_INPUT_STEER_RIGHT]-mControlAnalogVals[eVEHICLE_ANALOG_INPUT_STEER_LEFT].
- See also:
- setAnalogInput, getAnalogInput
Geardown digital control value used by vehicle simulation. If true a gear change will be initiated towards currentGear-1 (or to reverse if in first).
- See also:
- setDigitalInput, getDigitalInput
Gearup digital control value used by vehicle simulation. If true a gear change will be initiated towards currentGear+1 (or to first gear if in reverse).
- See also:
- setDigitalInput, getDigitalInput
PxU32 PxVehicleDriveDynData::mPad[2] [private] |
Target gear (different from current gear if a gear change is underway).
- See also:
- startGearChange, forceGearChange, getTargetGear
Autogear flag used by vehicle simulation. Set true to enable the autobox, false to disable the autobox.
- See also:
- setUseAutoGears, setUseAutoGears, toggleAutoGears
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com