PxVehicleDrive4WRawInputData Class Reference

Used to produce smooth vehicle driving control values from analog and digital inputs. More...

#include <PxVehicleUtilControl.h>

Inheritance diagram for PxVehicleDrive4WRawInputData:

Public Member Functions

 PxVehicleDrive4WRawInputData ()
 
virtual ~PxVehicleDrive4WRawInputData ()
 
void setDigitalAccel (const bool accelKeyPressed)
 Record if the accel button has been pressed on keyboard. More...
 
void setDigitalBrake (const bool brakeKeyPressed)
 Record if the brake button has been pressed on keyboard. More...
 
void setDigitalHandbrake (const bool handbrakeKeyPressed)
 Record if the handbrake button has been pressed on keyboard. More...
 
void setDigitalSteerLeft (const bool steerLeftKeyPressed)
 Record if the left steer button has been pressed on keyboard. More...
 
void setDigitalSteerRight (const bool steerRightKeyPressed)
 Record if the right steer button has been pressed on keyboard. More...
 
bool getDigitalAccel () const
 Return if the accel button has been pressed on keyboard. More...
 
bool getDigitalBrake () const
 Return if the brake button has been pressed on keyboard. More...
 
bool getDigitalHandbrake () const
 Return if the handbrake button has been pressed on keyboard. More...
 
bool getDigitalSteerLeft () const
 Return if the left steer button has been pressed on keyboard. More...
 
bool getDigitalSteerRight () const
 Return if the right steer button has been pressed on keyboard. More...
 
void setAnalogAccel (const PxReal accel)
 Set the analog accel value from the gamepad. More...
 
void setAnalogBrake (const PxReal brake)
 Set the analog brake value from the gamepad. More...
 
void setAnalogHandbrake (const PxReal handbrake)
 Set the analog handbrake value from the gamepad. More...
 
void setAnalogSteer (const PxReal steer)
 Set the analog steer value from the gamepad. More...
 
PxReal getAnalogAccel () const
 Return the analog accel value from the gamepad. More...
 
PxReal getAnalogBrake () const
 Return the analog brake value from the gamepad. More...
 
PxReal getAnalogHandbrake () const
 Return the analog handbrake value from the gamepad. More...
 
PxReal getAnalogSteer () const
 Return the analog steer value from the gamepad. More...
 
void setGearUp (const bool gearUpKeyPressed)
 Record if the gearup button has been pressed on keyboard or gamepad. More...
 
void setGearDown (const bool gearDownKeyPressed)
 Record if the geardown button has been pressed on keyboard or gamepad. More...
 
bool getGearUp () const
 Return if the gearup button has been pressed on keyboard or gamepad. More...
 
bool getGearDown () const
 Record if the geardown button has been pressed on keyboard or gamepad. More...
 

Private Attributes

bool mRawDigitalInputs [PxVehicleDrive4WControl::eMAX_NB_DRIVE4W_ANALOG_INPUTS]
 
PxReal mRawAnalogInputs [PxVehicleDrive4WControl::eMAX_NB_DRIVE4W_ANALOG_INPUTS]
 
bool mGearUp
 
bool mGearDown
 

Detailed Description

Used to produce smooth vehicle driving control values from analog and digital inputs.

See also
PxVehicleDrive4WSmoothDigitalRawInputsAndSetAnalogInputs, PxVehicleDrive4WSmoothAnalogRawInputsAndSetAnalogInputs

Constructor & Destructor Documentation

◆ PxVehicleDrive4WRawInputData()

PxVehicleDrive4WRawInputData::PxVehicleDrive4WRawInputData ( )
inline

◆ ~PxVehicleDrive4WRawInputData()

virtual PxVehicleDrive4WRawInputData::~PxVehicleDrive4WRawInputData ( )
inlinevirtual

Member Function Documentation

◆ getAnalogAccel()

PxReal PxVehicleDrive4WRawInputData::getAnalogAccel ( ) const
inline

Return the analog accel value from the gamepad.

Returns
The analog accel value.

References PxVehicleDrive4WControl::eANALOG_INPUT_ACCEL.

◆ getAnalogBrake()

PxReal PxVehicleDrive4WRawInputData::getAnalogBrake ( ) const
inline

Return the analog brake value from the gamepad.

Returns
The analog brake value.

References PxVehicleDrive4WControl::eANALOG_INPUT_BRAKE.

◆ getAnalogHandbrake()

PxReal PxVehicleDrive4WRawInputData::getAnalogHandbrake ( ) const
inline

Return the analog handbrake value from the gamepad.

Returns
The analog handbrake value.

References PxVehicleDrive4WControl::eANALOG_INPUT_HANDBRAKE.

◆ getAnalogSteer()

PxReal PxVehicleDrive4WRawInputData::getAnalogSteer ( ) const
inline

Return the analog steer value from the gamepad.

References PxVehicleDrive4WControl::eANALOG_INPUT_STEER_RIGHT.

◆ getDigitalAccel()

bool PxVehicleDrive4WRawInputData::getDigitalAccel ( ) const
inline

Return if the accel button has been pressed on keyboard.

Returns
True if the accel button has been pressed, false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_ACCEL.

◆ getDigitalBrake()

bool PxVehicleDrive4WRawInputData::getDigitalBrake ( ) const
inline

Return if the brake button has been pressed on keyboard.

Returns
True if the brake button has been pressed, false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_BRAKE.

◆ getDigitalHandbrake()

bool PxVehicleDrive4WRawInputData::getDigitalHandbrake ( ) const
inline

Return if the handbrake button has been pressed on keyboard.

Returns
True if the handbrake button has been pressed, false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_HANDBRAKE.

◆ getDigitalSteerLeft()

bool PxVehicleDrive4WRawInputData::getDigitalSteerLeft ( ) const
inline

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

Returns
True if the steer-left button has been pressed, false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_STEER_LEFT.

◆ getDigitalSteerRight()

bool PxVehicleDrive4WRawInputData::getDigitalSteerRight ( ) const
inline

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

Returns
True if the steer-right button has been pressed, false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_STEER_RIGHT.

◆ getGearDown()

bool PxVehicleDrive4WRawInputData::getGearDown ( ) const
inline

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

Returns
The value of the gear-down button.

◆ getGearUp()

bool PxVehicleDrive4WRawInputData::getGearUp ( ) const
inline

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

Returns
The value of the gear-up button.

◆ setAnalogAccel()

void PxVehicleDrive4WRawInputData::setAnalogAccel ( const PxReal  accel)
inline

Set the analog accel value from the gamepad.

Parameters
[in]accelis the analog accelerator pedal value in range(0,1) where 1 represents the pedal fully pressed and 0 represents the pedal in its rest state.

References PxVehicleDrive4WControl::eANALOG_INPUT_ACCEL.

◆ setAnalogBrake()

void PxVehicleDrive4WRawInputData::setAnalogBrake ( const PxReal  brake)
inline

Set the analog brake value from the gamepad.

Parameters
[in]brakeis the analog brake pedal value in range(0,1) where 1 represents the pedal fully pressed and 0 represents the pedal in its rest state.

References PxVehicleDrive4WControl::eANALOG_INPUT_BRAKE.

◆ setAnalogHandbrake()

void PxVehicleDrive4WRawInputData::setAnalogHandbrake ( const PxReal  handbrake)
inline

Set the analog handbrake value from the gamepad.

Parameters
[in]handbrakeis the analog handbrake value in range(0,1) where 1 represents the handbrake fully engaged and 0 represents the handbrake in its rest state.

References PxVehicleDrive4WControl::eANALOG_INPUT_HANDBRAKE.

◆ setAnalogSteer()

void PxVehicleDrive4WRawInputData::setAnalogSteer ( const PxReal  steer)
inline

Set the analog steer value from the gamepad.

Parameters
[in]steeris the analog steer value in range(-1,1) where -1 represents the steering wheel at left lock and +1 represents the steering wheel at right lock.

References PxVehicleDrive4WControl::eANALOG_INPUT_STEER_RIGHT.

◆ setDigitalAccel()

void PxVehicleDrive4WRawInputData::setDigitalAccel ( const bool  accelKeyPressed)
inline

Record if the accel button has been pressed on keyboard.

Parameters
[in]accelKeyPressedis true if the accelerator key has been pressed and false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_ACCEL.

◆ setDigitalBrake()

void PxVehicleDrive4WRawInputData::setDigitalBrake ( const bool  brakeKeyPressed)
inline

Record if the brake button has been pressed on keyboard.

Parameters
[in]brakeKeyPressedis true if the brake key has been pressed and false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_BRAKE.

◆ setDigitalHandbrake()

void PxVehicleDrive4WRawInputData::setDigitalHandbrake ( const bool  handbrakeKeyPressed)
inline

Record if the handbrake button has been pressed on keyboard.

Parameters
[in]handbrakeKeyPressedis true if the handbrake key has been pressed and false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_HANDBRAKE.

◆ setDigitalSteerLeft()

void PxVehicleDrive4WRawInputData::setDigitalSteerLeft ( const bool  steerLeftKeyPressed)
inline

Record if the left steer button has been pressed on keyboard.

Parameters
[in]steerLeftKeyPressedis true if the steer-left key has been pressed and false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_STEER_LEFT.

◆ setDigitalSteerRight()

void PxVehicleDrive4WRawInputData::setDigitalSteerRight ( const bool  steerRightKeyPressed)
inline

Record if the right steer button has been pressed on keyboard.

Parameters
[in]steerRightKeyPressedis true if the steer-right key has been pressed and false otherwise.

References PxVehicleDrive4WControl::eANALOG_INPUT_STEER_RIGHT.

◆ setGearDown()

void PxVehicleDrive4WRawInputData::setGearDown ( const bool  gearDownKeyPressed)
inline

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

Parameters
[in]gearDownKeyPressedis true if the gear-down button has been pressed, false otherwise.

◆ setGearUp()

void PxVehicleDrive4WRawInputData::setGearUp ( const bool  gearUpKeyPressed)
inline

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

Parameters
[in]gearUpKeyPressedis true if the gear-up button has been pressed, false otherwise.

Member Data Documentation

◆ mGearDown

bool PxVehicleDrive4WRawInputData::mGearDown
private

◆ mGearUp

bool PxVehicleDrive4WRawInputData::mGearUp
private

◆ mRawAnalogInputs

PxReal PxVehicleDrive4WRawInputData::mRawAnalogInputs[PxVehicleDrive4WControl::eMAX_NB_DRIVE4W_ANALOG_INPUTS]
private

◆ mRawDigitalInputs

bool PxVehicleDrive4WRawInputData::mRawDigitalInputs[PxVehicleDrive4WControl::eMAX_NB_DRIVE4W_ANALOG_INPUTS]
private

The documentation for this class was generated from the following file: