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) More... | |
void | setDigitalAccel (const bool b) |
Set if the accel button has been pressed on the keyboard. More... | |
void | setDigitalLeftThrust (const bool b) |
Set if the left thrust button has been pressed on the keyboard. More... | |
void | setDigitalRightThrust (const bool b) |
Set if the right thrust button has been pressed on the keyboard. More... | |
void | setDigitalLeftBrake (const bool b) |
Set if the left brake button has been pressed on the keyboard. More... | |
void | setDigitalRightBrake (const bool b) |
Set if the right brake button has been pressed on the keyboard. More... | |
bool | getDigitalAccel () const |
Return if the accel button has been pressed on the keyboard. More... | |
bool | getDigitalLeftThrust () const |
Return if the left thrust button has been pressed on the keyboard. More... | |
bool | getDigitalRightThrust () const |
Return if the right thrust button has been pressed on the keyboard. More... | |
bool | getDigitalLeftBrake () const |
Return if the left brake button has been pressed on the keyboard. More... | |
bool | getDigitalRightBrake () const |
Return if the right brake button has been pressed on the keyboard. More... | |
void | setAnalogAccel (const PxF32 accel) |
Set the analog accel value from the gamepad. More... | |
void | setAnalogLeftThrust (const PxF32 leftThrust) |
Set the analog left thrust value from the gamepad. More... | |
void | setAnalogRightThrust (const PxF32 rightThrust) |
Set the analog right thrust value from the gamepad. More... | |
void | setAnalogLeftBrake (const PxF32 leftBrake) |
Set the analog left brake value from the gamepad. More... | |
void | setAnalogRightBrake (const PxF32 rightBrake) |
Set the analog right brake value from the gamepad. More... | |
PxF32 | getAnalogAccel () const |
Return the analog accel value from the gamepad. More... | |
PxF32 | getAnalogLeftThrust () const |
Return the analog left thrust value from the gamepad. More... | |
PxF32 | getAnalogRightThrust () const |
Return the analog right thrust value from the gamepad. More... | |
PxF32 | getAnalogLeftBrake () const |
Return the analog left brake value from the gamepad. More... | |
PxF32 | getAnalogRightBrake () const |
Return the analog right brake value from the gamepad. More... | |
void | setGearUp (const bool gearUp) |
Record if the gear-up button has been pressed on keyboard or gamepad. More... | |
void | setGearDown (const bool gearDown) |
Record if the gear-down button has been pressed on keyboard or gamepad. More... | |
bool | getGearUp () const |
Return if the gear-up button has been pressed on keyboard or gamepad. More... | |
bool | getGearDown () const |
Return if the gear-down button has been pressed on keyboard or gamepad. More... | |
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 |
Used to produce smooth analog tank control values from analog and digital inputs.
|
inline |
|
inline |
|
inline |
Return the analog accel value from the gamepad.
References PxVehicleDriveTankControl::eANALOG_INPUT_ACCEL.
|
inline |
Return the analog left brake value from the gamepad.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_LEFT.
|
inline |
Return the analog left thrust value from the gamepad.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_LEFT.
|
inline |
Return the analog right brake value from the gamepad.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_RIGHT.
|
inline |
Return the analog right thrust value from the gamepad.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_RIGHT.
|
inline |
Return if the accel button has been pressed on the keyboard.
References PxVehicleDriveTankControl::eANALOG_INPUT_ACCEL.
|
inline |
Return if the left brake button has been pressed on the keyboard.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_LEFT.
|
inline |
Return if the left thrust button has been pressed on the keyboard.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_LEFT.
|
inline |
Return if the right brake button has been pressed on the keyboard.
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_RIGHT.
|
inline |
Return if the right thrust button has been pressed on the keyboard.
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_RIGHT.
|
inline |
Return the drive model (eDRIVE_MODEL_SPECIAL or eDRIVE_MODEL_STANDARD)
|
inline |
Return if the gear-down button has been pressed on keyboard or gamepad.
|
inline |
Return if the gear-up button has been pressed on keyboard or gamepad.
|
inline |
Set the analog accel value from the gamepad.
[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.
|
inline |
Set the analog left brake value from the gamepad.
[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. |
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_LEFT.
|
inline |
Set the analog left thrust value from the gamepad.
[in] | leftThrust | represents the state of the left stick. |
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_LEFT, and PxVehicleDriveTankControlModel::eSPECIAL.
|
inline |
Set the analog right brake value from the gamepad.
[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. |
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_RIGHT.
|
inline |
Set the analog right thrust value from the gamepad.
[in] | rightThrust | represents the state of the right stick. |
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_RIGHT, and PxVehicleDriveTankControlModel::eSPECIAL.
|
inline |
Set if the accel button has been pressed on the keyboard.
[in] | b | is true if the digital accel button has been pressed, false otherwise. |
References PxVehicleDriveTankControl::eANALOG_INPUT_ACCEL.
|
inline |
Set if the left brake button has been pressed on the keyboard.
[in] | b | is true if the digital left brake button has been pressed, false otherwise. |
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_LEFT.
|
inline |
Set if the left thrust button has been pressed on the keyboard.
[in] | b | is true if the digital left thrust button has been pressed, false otherwise. |
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_LEFT.
|
inline |
Set if the right brake button has been pressed on the keyboard.
[in] | b | is true if the digital right brake button has been pressed, false otherwise. |
References PxVehicleDriveTankControl::eANALOG_INPUT_BRAKE_RIGHT.
|
inline |
Set if the right thrust button has been pressed on the keyboard.
[in] | b | is true if the digital right thrust button has been pressed, false otherwise. |
References PxVehicleDriveTankControl::eANALOG_INPUT_THRUST_RIGHT.
|
inline |
Record if the gear-down button has been pressed on keyboard or gamepad.
[in] | gearDown | is true if the gear-down button has been pressed, false otherwise. |
|
inline |
Record if the gear-up button has been pressed on keyboard or gamepad.
[in] | gearUp | is true if the gear-up button has been pressed, false otherwise. |
|
private |
|
private |
|
private |
|
private |
|
private |