Public Member Functions | Private Attributes | List of all members
PxVehicleDriveTankRawInputData Class Reference

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
 

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]accelis 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]leftBrakeis 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]leftThrustrepresents 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]rightBrakeis 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]rightThrustrepresents 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]bis 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]bis 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]bis 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]bis 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]bis 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]gearDownis 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]gearUpis true if the gear-up button has been pressed, false otherwise.

Member Data Documentation

bool PxVehicleDriveTankRawInputData::mGearDown
private
bool PxVehicleDriveTankRawInputData::mGearUp
private
PxVehicleDriveTankControlModel::Enum PxVehicleDriveTankRawInputData::mMode
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-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com