PhysX SDK 3.2 API Reference: PxVehicleDriveTankRawInputData Class Reference

PhysX SDK 3.2 API

PxVehicleDriveTankRawInputData Class Reference
[Vehicle]

Used to produce smooth analog tank control values from analog inputs. More...

#include <PxVehicleUtilControl.h>

List of all members.


Public Member Functions

 PxVehicleDriveTankRawInputData (const PxVehicleDriveTank::eDriveModel mode)
 ~PxVehicleDriveTankRawInputData ()
PxVehicleDriveTank::eDriveModel 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 In range (0,1).
void setAnalogLeftThrust (const PxF32 leftAccel)
 Set the analog left thrust value from the gamepad In range (0,1) for standard mode, in range (-1,1) for special mode.
void setAnalogRightThrust (const PxF32 rightAccel)
 Set the analog right thrust value from the gamepad In range (0,1) for standard mode, in range (-1,1) for special mode.
void setAnalogLeftBrake (const PxF32 leftBrake)
 Set the analog left brake value from the gamepad In range (0,1).
void setAnalogRightBrake (const PxF32 rightBrake)
 Set the analog right brake value from the gamepad In range (0,1).
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 gearup button has been pressed on keyboard or gamepad.
void setGearDown (const bool gearDown)
 Record if the geardown button has been pressed on keyboard or gamepad.
bool getGearUp () const
 Return if the gearup button has been pressed on keyboard or gamepad.
bool getGearDown () const
 Return if the geardown button has been pressed on keyboard or gamepad.

Private Attributes

PxVehicleDriveTank::eDriveModel mMode
PxReal mRawAnalogInputs [PxVehicleDriveTank::eMAX_NUM_DRIVETANK_ANALOG_INPUTS]
bool mRawDigitalInputs [PxVehicleDriveTank::eMAX_NUM_DRIVETANK_ANALOG_INPUTS]
bool mGearUp
bool mGearDown

Detailed Description

Used to produce smooth analog tank control values from analog inputs.

See also:
PxVehicleDriveTankSmoothDigitalRawInputsAndSetAnalogInputs, PxVehicleDriveTankSmoothAnalogRawInputsAndSetAnalogInputs

Constructor & Destructor Documentation

PxVehicleDriveTankRawInputData::PxVehicleDriveTankRawInputData ( const PxVehicleDriveTank::eDriveModel  mode  )  [inline]

PxVehicleDriveTankRawInputData::~PxVehicleDriveTankRawInputData (  )  [inline]


Member Function Documentation

PxF32 PxVehicleDriveTankRawInputData::getAnalogAccel (  )  const [inline]

Return the analog accel value from the gamepad.

References PxVehicleDriveTank::eANALOG_INPUT_ACCEL.

PxF32 PxVehicleDriveTankRawInputData::getAnalogLeftBrake (  )  const [inline]

Return the analog left brake value from the gamepad.

References PxVehicleDriveTank::eANALOG_INPUT_BRAKE_LEFT.

PxF32 PxVehicleDriveTankRawInputData::getAnalogLeftThrust (  )  const [inline]

Return the analog left thrust value from the gamepad.

References PxVehicleDriveTank::eANALOG_INPUT_THRUST_LEFT.

PxF32 PxVehicleDriveTankRawInputData::getAnalogRightBrake (  )  const [inline]

Return the analog right brake value from the gamepad.

References PxVehicleDriveTank::eANALOG_INPUT_BRAKE_RIGHT.

PxF32 PxVehicleDriveTankRawInputData::getAnalogRightThrust (  )  const [inline]

Return the analog right thrust value from the gamepad.

References PxVehicleDriveTank::eANALOG_INPUT_THRUST_RIGHT.

bool PxVehicleDriveTankRawInputData::getDigitalAccel (  )  const [inline]

Return if the accel button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_ACCEL.

bool PxVehicleDriveTankRawInputData::getDigitalLeftBrake (  )  const [inline]

Return if the left brake button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_BRAKE_LEFT.

bool PxVehicleDriveTankRawInputData::getDigitalLeftThrust (  )  const [inline]

Return if the left thrust button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_THRUST_LEFT.

bool PxVehicleDriveTankRawInputData::getDigitalRightBrake (  )  const [inline]

Return if the right brake button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_BRAKE_RIGHT.

bool PxVehicleDriveTankRawInputData::getDigitalRightThrust (  )  const [inline]

Return if the right thrust button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_THRUST_RIGHT.

PxVehicleDriveTank::eDriveModel PxVehicleDriveTankRawInputData::getDriveModel (  )  const [inline]

Return the drive model (eDRIVE_MODEL_SPECIAL or eDRIVE_MODEL_STANDARD).

bool PxVehicleDriveTankRawInputData::getGearDown (  )  const [inline]

Return if the geardown button has been pressed on keyboard or gamepad.

bool PxVehicleDriveTankRawInputData::getGearUp (  )  const [inline]

Return if the gearup button has been pressed on keyboard or gamepad.

void PxVehicleDriveTankRawInputData::setAnalogAccel ( const PxF32  accel  )  [inline]

Set the analog accel value from the gamepad In range (0,1).

References PxVehicleDriveTank::eANALOG_INPUT_ACCEL, and PX_ASSERT.

void PxVehicleDriveTankRawInputData::setAnalogLeftBrake ( const PxF32  leftBrake  )  [inline]

Set the analog left brake value from the gamepad In range (0,1).

References PxVehicleDriveTank::eANALOG_INPUT_BRAKE_LEFT, and PX_ASSERT.

void PxVehicleDriveTankRawInputData::setAnalogLeftThrust ( const PxF32  leftAccel  )  [inline]

Set the analog left thrust value from the gamepad In range (0,1) for standard mode, in range (-1,1) for special mode.

References PxVehicleDriveTank::eANALOG_INPUT_THRUST_LEFT, PxVehicleDriveTank::eDRIVE_MODEL_SPECIAL, and PX_ASSERT.

void PxVehicleDriveTankRawInputData::setAnalogRightBrake ( const PxF32  rightBrake  )  [inline]

Set the analog right brake value from the gamepad In range (0,1).

References PxVehicleDriveTank::eANALOG_INPUT_BRAKE_RIGHT, and PX_ASSERT.

void PxVehicleDriveTankRawInputData::setAnalogRightThrust ( const PxF32  rightAccel  )  [inline]

Set the analog right thrust value from the gamepad In range (0,1) for standard mode, in range (-1,1) for special mode.

References PxVehicleDriveTank::eANALOG_INPUT_THRUST_RIGHT, PxVehicleDriveTank::eDRIVE_MODEL_SPECIAL, and PX_ASSERT.

void PxVehicleDriveTankRawInputData::setDigitalAccel ( const bool  b  )  [inline]

Set if the accel button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_ACCEL.

void PxVehicleDriveTankRawInputData::setDigitalLeftBrake ( const bool  b  )  [inline]

Set if the left brake button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_BRAKE_LEFT.

void PxVehicleDriveTankRawInputData::setDigitalLeftThrust ( const bool  b  )  [inline]

Set if the left thrust button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_THRUST_LEFT.

void PxVehicleDriveTankRawInputData::setDigitalRightBrake ( const bool  b  )  [inline]

Set if the right brake button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_BRAKE_RIGHT.

void PxVehicleDriveTankRawInputData::setDigitalRightThrust ( const bool  b  )  [inline]

Set if the right thrust button has been pressed on the keyboard.

References PxVehicleDriveTank::eANALOG_INPUT_THRUST_RIGHT.

void PxVehicleDriveTankRawInputData::setGearDown ( const bool  gearDown  )  [inline]

Record if the geardown button has been pressed on keyboard or gamepad.

void PxVehicleDriveTankRawInputData::setGearUp ( const bool  gearUp  )  [inline]

Record if the gearup button has been pressed on keyboard or gamepad.


Member Data Documentation

PxReal PxVehicleDriveTankRawInputData::mRawAnalogInputs[PxVehicleDriveTank::eMAX_NUM_DRIVETANK_ANALOG_INPUTS] [private]

bool PxVehicleDriveTankRawInputData::mRawDigitalInputs[PxVehicleDriveTank::eMAX_NUM_DRIVETANK_ANALOG_INPUTS] [private]


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