30 #ifndef PX_VEHICLE_CONTROL_H 31 #define PX_VEHICLE_CONTROL_H 47 void testValidAnalogValue(
const PxF32 actualValue,
const PxF32 minVal,
const PxF32 maxVal,
const char* errorString);
102 mRawDigitalInputs[i]=
false;
103 mRawAnalogInputs[i]=0.0f;
183 testValidAnalogValue(accel, 0.0f, 1.0f,
"Analog accel must be in range (0,1)");
195 testValidAnalogValue(brake, 0.0f, 1.0f,
"Analog brake must be in range (0,1)");
207 testValidAnalogValue(handbrake, 0.0f, 1.0f,
"Analog handbrake must be in range (0,1)");
219 testValidAnalogValue(steer, -1.0f, 1.0f,
"Analog steer must be in range (-1,1)");
251 void setGearUp(
const bool gearUpKeyPressed) {mGearUp=gearUpKeyPressed;}
257 void setGearDown(
const bool gearDownKeyPressed) {mGearDown=gearDownKeyPressed;}
294 const bool isVehicleInAir,
311 const bool isVehicleInAir,
341 const bool isVehicleInAir,
358 const bool isVehicleInAir,
375 mRawAnalogInputs[i]=0.0f;
376 mRawDigitalInputs[i]=
false;
465 testValidAnalogValue(accel, 0.0f, 1.0f,
"Tank analog accel must be in range (-1,1)");
480 testValidAnalogValue(leftThrust, -1.0f, 1.0f,
"Tank left thrust must be in range (-1,1) in eSPECIAL mode.");
484 testValidAnalogValue(leftThrust, 0.0f, 1.0f,
"Tank left thrust must be in range (0,1) in eSTANDARD mode.");
500 testValidAnalogValue(rightThrust, -1.0f, 1.0f,
"Tank right thrust must be in range (-1,1) in eSPECIAL mode.");
504 testValidAnalogValue(rightThrust, 0.0f, 1.0f,
"Tank right thrust must be in range (0,1) in eSTANDARD mode.");
518 testValidAnalogValue(leftBrake, 0.0f, 1.0f,
"Tank left brake must be in range (0,1).");
531 testValidAnalogValue(rightBrake, 0.0f, 1.0f,
"Tank right brake must be in range (0,1).");
651 #endif //PX_VEHICLE_CONTROL_H Definition: GuContactBuffer.h:37
Definition: PxVehicleDrive4W.h:166
float PxF32
Definition: PxSimpleTypes.h:76
void PxVehicleDrive4WSmoothAnalogRawInputsAndSetAnalogInputs(const PxVehiclePadSmoothingData &padSmoothing, const PxFixedSizeLookupTable< 8 > &steerVsForwardSpeedTable, const PxVehicleDrive4WRawInputData &rawInputData, const PxReal timestep, const bool isVehicleInAir, PxVehicleDrive4W &focusVehicle)
Used to smooth and set analog vehicle control values from analog inputs (gamepad). Also used to set boolean gearup, geardown values.
float PxReal
Definition: PxSimpleTypes.h:78
Data structure with instanced dynamics data and configuration data of a vehicle with up to PX_MAX_NB_...
Definition: PxVehicleDriveNW.h:134
Used to produce smooth vehicle driving control values from key inputs.
Definition: PxVehicleUtilControl.h:54
Definition: PxVehicleDrive4W.h:169
Definition: PxVehicleDriveTank.h:114
Definition: PxVehicleDriveTank.h:110
Enum
Definition: PxVehicleDriveTank.h:139
Definition: PxCoreUtilityTypes.h:100
Used to produce smooth analog vehicle control values from analog inputs.
Definition: PxVehicleUtilControl.h:74
void PxVehicleDriveNWSmoothAnalogRawInputsAndSetAnalogInputs(const PxVehiclePadSmoothingData &padSmoothing, const PxFixedSizeLookupTable< 8 > &steerVsForwardSpeedTable, const PxVehicleDriveNWRawInputData &rawInputData, const PxReal timestep, const bool isVehicleInAir, PxVehicleDriveNW &focusVehicle)
Used to smooth and set analog vehicle control values from analog inputs (gamepad). Also used to set boolean gearup, geardown values.
Definition: PxVehicleDriveTank.h:112
Definition: PxVehicleDrive4W.h:167
Definition: PxVehicleDriveTank.h:109
Definition: PxVehicleDrive.h:177
Definition: PxVehicleDrive4W.h:164
Definition: PxVehicleDrive4W.h:165
#define PX_COMPILE_TIME_ASSERT(exp)
Definition: PxPreprocessor.h:434
void PxVehicleDrive4WSmoothDigitalRawInputsAndSetAnalogInputs(const PxVehicleKeySmoothingData &keySmoothing, const PxFixedSizeLookupTable< 8 > &steerVsForwardSpeedTable, const PxVehicleDrive4WRawInputData &rawInputData, const PxReal timestep, const bool isVehicleInAir, PxVehicleDrive4W &focusVehicle)
Used to smooth and set analog vehicle control values (accel,brake,handbrake,steer) from digital input...
Definition: PxVehicleDriveTank.h:113
Data structure with instanced dynamics data and configuration data of a vehicle with up to 4 driven w...
Definition: PxVehicleDrive4W.h:176
Definition: PxVehicleDriveTank.h:142
void PxVehicleDriveTankSmoothAnalogRawInputsAndSetAnalogInputs(const PxVehiclePadSmoothingData &padSmoothing, const PxVehicleDriveTankRawInputData &rawInputData, const PxReal timestep, PxVehicleDriveTank &focusVehicle)
Used to smooth and set analog tank control values from analog inputs (gamepad). Also used to set bool...
uint32_t PxU32
Definition: Px.h:48
Definition: PxVehicleDrive4W.h:168
Data structure with instanced dynamics data and configuration data of a tank.
Definition: PxVehicleDriveTank.h:150
void PxVehicleDriveTankSmoothDigitalRawInputsAndSetAnalogInputs(const PxVehicleKeySmoothingData &keySmoothing, const PxVehicleDriveTankRawInputData &rawInputData, const PxReal timestep, PxVehicleDriveTank &focusVehicle)
Used to smooth and set analog tank control values from digital inputs (keyboard). Also used to set bo...
Definition: PxVehicleDriveTank.h:111
void PxVehicleDriveNWSmoothDigitalRawInputsAndSetAnalogInputs(const PxVehicleKeySmoothingData &keySmoothing, const PxFixedSizeLookupTable< 8 > &steerVsForwardSpeedTable, const PxVehicleDriveNWRawInputData &rawInputData, const PxReal timestep, const bool isVehicleInAir, PxVehicleDriveNW &focusVehicle)
Used to smooth and set analog vehicle control values (accel,brake,handbrake,steer) from digital input...