PxVehicleDriveTankRawInputData Class Reference
[Vehicle]
Used to produce smooth analog tank control values from analog and digital inputs.
More...
#include <PxVehicleUtilControl.h>
Public Member Functions | |
PxVehicleDriveTankRawInputData (const PxVehicleDriveTankControlModel::Enum mode) | |
~PxVehicleDriveTankRawInputData () | |
PxVehicleDriveTankControlModel::Enum | getDriveModel () const |
Return the drive model (eDRIVE_MODEL_SPECIAL or eDRIVE_MODEL_STANDARD). | |
void | setDigitalAccel (const bool b) |
Set if the accel button has been pressed on the keyboard. | |
void | setDigitalLeftThrust (const bool b) |
Set if the left thrust button has been pressed on the keyboard. | |
void | setDigitalRightThrust (const bool b) |
Set if the right thrust button has been pressed on the keyboard. | |
void | setDigitalLeftBrake (const bool b) |
Set if the left brake button has been pressed on the keyboard. | |
void | setDigitalRightBrake (const bool b) |
Set if the right brake button has been pressed on the keyboard. | |
bool | getDigitalAccel () const |
Return if the accel button has been pressed on the keyboard. | |
bool | getDigitalLeftThrust () const |
Return if the left thrust button has been pressed on the keyboard. | |
bool | getDigitalRightThrust () const |
Return if the right thrust button has been pressed on the keyboard. | |
bool | getDigitalLeftBrake () const |
Return if the left brake button has been pressed on the keyboard. | |
bool | getDigitalRightBrake () const |
Return if the right brake button has been pressed on the keyboard. | |
void | setAnalogAccel (const PxF32 accel) |
Set the analog accel value from the gamepad. | |
void | setAnalogLeftThrust (const PxF32 leftThrust) |
Set the analog left thrust value from the gamepad. | |
void | setAnalogRightThrust (const PxF32 rightThrust) |
Set the analog right thrust value from the gamepad. | |
void | setAnalogLeftBrake (const PxF32 leftBrake) |
Set the analog left brake value from the gamepad. | |
void | setAnalogRightBrake (const PxF32 rightBrake) |
Set the analog right brake value from the gamepad. | |
PxF32 | getAnalogAccel () const |
Return the analog accel value from the gamepad. | |
PxF32 | getAnalogLeftThrust () const |
Return the analog left thrust value from the gamepad. | |
PxF32 | getAnalogRightThrust () const |
Return the analog right thrust value from the gamepad. | |
PxF32 | getAnalogLeftBrake () const |
Return the analog left brake value from the gamepad. | |
PxF32 | getAnalogRightBrake () const |
Return the analog right brake value from the gamepad. | |
void | setGearUp (const bool gearUp) |
Record if the gear-up button has been pressed on keyboard or gamepad. | |
void | setGearDown (const bool gearDown) |
Record if the gear-down button has been pressed on keyboard or gamepad. | |
bool | getGearUp () const |
Return if the gear-up button has been pressed on keyboard or gamepad. | |
bool | getGearDown () const |
Return if the gear-down button has been pressed on keyboard or gamepad. | |
Private Attributes | |
PxVehicleDriveTankControlModel::Enum | mMode |
PxReal | mRawAnalogInputs [PxVehicleDriveTankControl::eMAX_NB_DRIVETANK_ANALOG_INPUTS] |
bool | mRawDigitalInputs [PxVehicleDriveTankControl::eMAX_NB_DRIVETANK_ANALOG_INPUTS] |
bool | mGearUp |
bool | mGearDown |
Detailed Description
Used to produce smooth analog tank control values from analog and digital inputs.
- See also:
- PxVehicleDriveTankSmoothDigitalRawInputsAndSetAnalogInputs, PxVehicleDriveTankSmoothAnalogRawInputsAndSetAnalogInputs
Constructor & Destructor Documentation
PxVehicleDriveTankRawInputData::PxVehicleDriveTankRawInputData | ( | const PxVehicleDriveTankControlModel::Enum | mode | ) | [inline] |
PxVehicleDriveTankRawInputData::~PxVehicleDriveTankRawInputData | ( | ) | [inline] |
Member Function Documentation
PxF32 PxVehicleDriveTankRawInputData::getAnalogAccel | ( | ) | const [inline] |
Return the analog accel value from the gamepad.
- Returns:
- The analog accel value.
References PxVehicleDriveTankControl::eANALOG_INPUT_ACCEL.
PxF32 PxVehicleDriveTankRawInputData::getAnalogLeftBrake | ( | ) | const [inline] |
Return the analog left brake value from the gamepad.
- Returns:
- The analog left brake value.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_LEFT.
PxF32 PxVehicleDriveTankRawInputData::getAnalogLeftThrust | ( | ) | const [inline] |
Return the analog left thrust value from the gamepad.
- Returns:
- The analog left thrust value.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_LEFT.
PxF32 PxVehicleDriveTankRawInputData::getAnalogRightBrake | ( | ) | const [inline] |
Return the analog right brake value from the gamepad.
- Returns:
- The analog right brake value.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_RIGHT.
PxF32 PxVehicleDriveTankRawInputData::getAnalogRightThrust | ( | ) | const [inline] |
Return the analog right thrust value from the gamepad.
- Returns:
- The analog right thrust value.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_RIGHT.
bool PxVehicleDriveTankRawInputData::getDigitalAccel | ( | ) | const [inline] |
Return if the accel button has been pressed on the keyboard.
- Returns:
- True if the accel button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_ACCEL.
bool PxVehicleDriveTankRawInputData::getDigitalLeftBrake | ( | ) | const [inline] |
Return if the left brake button has been pressed on the keyboard.
- Returns:
- True if the left brake button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_LEFT.
bool PxVehicleDriveTankRawInputData::getDigitalLeftThrust | ( | ) | const [inline] |
Return if the left thrust button has been pressed on the keyboard.
- Returns:
- True if the left thrust button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_LEFT.
bool PxVehicleDriveTankRawInputData::getDigitalRightBrake | ( | ) | const [inline] |
Return if the right brake button has been pressed on the keyboard.
- Returns:
- True if the right brake button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_RIGHT.
bool PxVehicleDriveTankRawInputData::getDigitalRightThrust | ( | ) | const [inline] |
Return if the right thrust button has been pressed on the keyboard.
- Returns:
- True if the right thrust button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_RIGHT.
PxVehicleDriveTankControlModel::Enum PxVehicleDriveTankRawInputData::getDriveModel | ( | ) | const [inline] |
Return the drive model (eDRIVE_MODEL_SPECIAL or eDRIVE_MODEL_STANDARD).
- Returns:
- The chosen tank drive model.
bool PxVehicleDriveTankRawInputData::getGearDown | ( | ) | const [inline] |
Return if the gear-down button has been pressed on keyboard or gamepad.
- Returns:
- True if the gear-down button has been pressed, false otherwise.
bool PxVehicleDriveTankRawInputData::getGearUp | ( | ) | const [inline] |
Return if the gear-up button has been pressed on keyboard or gamepad.
- Returns:
- True if the gear-up button has been pressed, false otherwise.
void PxVehicleDriveTankRawInputData::setAnalogAccel | ( | const PxF32 | accel | ) | [inline] |
Set the analog accel value from the gamepad.
- Parameters:
-
[in] accel is a value in range (0,1) where 1 represents the accelerator pedal fully pressed and 0 represents the pedal in its rest state. In range (0,1).
References PxVehicleDriveTankControl::eANALOG_INPUT_ACCEL.
void PxVehicleDriveTankRawInputData::setAnalogLeftBrake | ( | const PxF32 | leftBrake | ) | [inline] |
Set the analog left brake value from the gamepad.
- Parameters:
-
[in] leftBrake is a value in range (0,1) where 1 represents the left brake pedal fully pressed and 0 represents the left brake pedal in its rest state.
- Note:
- In range (0,1).
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_LEFT.
void PxVehicleDriveTankRawInputData::setAnalogLeftThrust | ( | const PxF32 | leftThrust | ) | [inline] |
Set the analog left thrust value from the gamepad.
- Parameters:
-
[in] leftThrust represents the state of the left stick.
- Note:
- In range (0,1) for standard mode (eSTANDARD), in range (-1,1) for special mode (eSPECIAL)
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_LEFT, and PxVehicleDriveTankControlModel::eSPECIAL.
void PxVehicleDriveTankRawInputData::setAnalogRightBrake | ( | const PxF32 | rightBrake | ) | [inline] |
Set the analog right brake value from the gamepad.
- Parameters:
-
[in] rightBrake is a value in range (0,1) where 1 represents the right brake pedal fully pressed and 0 represents the right brake pedal in its rest state.
- Note:
- In range (0,1).
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_RIGHT.
void PxVehicleDriveTankRawInputData::setAnalogRightThrust | ( | const PxF32 | rightThrust | ) | [inline] |
Set the analog right thrust value from the gamepad.
- Parameters:
-
[in] rightThrust represents the state of the right stick.
- Note:
- In range (0,1) for standard mode (eSTANDARD), in range (-1,1) for special mode (eSPECIAL)
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_RIGHT, and PxVehicleDriveTankControlModel::eSPECIAL.
void PxVehicleDriveTankRawInputData::setDigitalAccel | ( | const bool | b | ) | [inline] |
Set if the accel button has been pressed on the keyboard.
- Parameters:
-
[in] b is true if the digital accel button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_ACCEL.
void PxVehicleDriveTankRawInputData::setDigitalLeftBrake | ( | const bool | b | ) | [inline] |
Set if the left brake button has been pressed on the keyboard.
- Parameters:
-
[in] b is true if the digital left brake button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_LEFT.
void PxVehicleDriveTankRawInputData::setDigitalLeftThrust | ( | const bool | b | ) | [inline] |
Set if the left thrust button has been pressed on the keyboard.
- Parameters:
-
[in] b is true if the digital left thrust button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_LEFT.
void PxVehicleDriveTankRawInputData::setDigitalRightBrake | ( | const bool | b | ) | [inline] |
Set if the right brake button has been pressed on the keyboard.
- Parameters:
-
[in] b is true if the digital right brake button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_RIGHT.
void PxVehicleDriveTankRawInputData::setDigitalRightThrust | ( | const bool | b | ) | [inline] |
Set if the right thrust button has been pressed on the keyboard.
- Parameters:
-
[in] b is true if the digital right thrust button has been pressed, false otherwise.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_RIGHT.
void PxVehicleDriveTankRawInputData::setGearDown | ( | const bool | gearDown | ) | [inline] |
Record if the gear-down button has been pressed on keyboard or gamepad.
- Parameters:
-
[in] gearDown is true if the gear-down button has been pressed, false otherwise.
void PxVehicleDriveTankRawInputData::setGearUp | ( | const bool | gearUp | ) | [inline] |
Record if the gear-up button has been pressed on keyboard or gamepad.
- Parameters:
-
[in] gearUp is true if the gear-up button has been pressed, false otherwise.
Member Data Documentation
bool PxVehicleDriveTankRawInputData::mGearDown [private] |
bool PxVehicleDriveTankRawInputData::mGearUp [private] |
PxReal PxVehicleDriveTankRawInputData::mRawAnalogInputs[PxVehicleDriveTankControl::eMAX_NB_DRIVETANK_ANALOG_INPUTS] [private] |
bool PxVehicleDriveTankRawInputData::mRawDigitalInputs[PxVehicleDriveTankControl::eMAX_NB_DRIVETANK_ANALOG_INPUTS] [private] |
The documentation for this class was generated from the following file:
Copyright © 2008-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com