30 #ifndef PX_VEHICLE_DRIVE_H    31 #define PX_VEHICLE_DRIVE_H   177         eMAX_NB_ANALOG_INPUTS=16
   193     void setAnalogInput(
const PxU32 type, 
const PxReal analogVal);
   213         mGearUpPressed = digitalVal;
   227         mGearDownPressed = digitalVal;
   236         return mGearUpPressed;
   245         return mGearDownPressed;
   255         mUseAutoGears=useAutoGears;
   264         return mUseAutoGears;
   273         mUseAutoGears = !mUseAutoGears;
   289         mCurrentGear = currentGear;
   317         mTargetGear = targetGear;
   343         mTargetGear=targetGear;
   355         mTargetGear=targetGear;
   356         mCurrentGear=targetGear;
   366         mEnginespeed = speed;
   390         return mGearSwitchTime;
   402         return mAutoBoxSwitchTime;
   414     PxReal mControlAnalogVals[eMAX_NB_ANALOG_INPUTS];
   506     friend class PxVehicleUpdate;
   519     bool isValid() 
const;
   524     void setToRestState();
   529     static PxU32 computeByteSize(
const PxU32 numWheels);
   531     virtual void init(
const PxU32 numWheels);
   545          const PxU32 nbDrivenWheels, 
const PxU32 nbNonDrivenWheels);
   565 #endif //PX_VEHICLE_DRIVE_H Definition: GuContactBuffer.h:37
 
bool mUseAutoGears
Auto-gear flag used by vehicle simulation. Set true to enable the autobox, false to disable the autob...
Definition: PxVehicleDrive.h:420
 
Friction for each combination of driving surface type and tire type. 
Definition: PxVehicleTireFriction.h:62
 
PX_FORCE_INLINE PxReal getEngineRotationSpeed() const
Return the rotation speed of the engine (radians per second) 
Definition: PxVehicleDrive.h:374
 
static void getBinaryMetaData(PxOutputStream &stream)
 
PX_FORCE_INLINE PxU32 getCurrentGear() const
Get the current gear. 
Definition: PxVehicleDrive.h:299
 
PxVehicleGearsData mGears
Definition: PxVehicleDrive.h:135
 
PxRigidDynamic represents a dynamic rigid simulation object in the physics SDK. 
Definition: PxRigidDynamic.h:83
 
float PxF32
Definition: PxSimpleTypes.h:76
 
PxFilterData is user-definable data which gets passed into the collision filtering shader and/or call...
Definition: PxFiltering.h:366
 
PX_FORCE_INLINE PxU32 getGearChange() const
Definition: PxVehicleDrive.h:485
 
Abstract class for collision shapes. 
Definition: PxShape.h:142
 
Definition: PxVehicleComponents.h:664
 
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:351
 
float PxReal
Definition: PxSimpleTypes.h:78
 
virtual bool isKindOf(const char *superClass) const
Returns whether a given type name matches with the type of this instance. 
Definition: PxBase.h:178
 
void setToRestState()
Set vehicle to rest. 
 
PxU32 mCurrentGear
Current gear. 
Definition: PxVehicleDrive.h:444
 
PxReal mGearSwitchTime
Reported time that has passed since gear change started. 
Definition: PxVehicleDrive.h:462
 
void setGearUp(const bool digitalVal)
Inform the vehicle that the gear-up button has been pressed. 
Definition: PxVehicleDrive.h:211
 
Data structure with instanced dynamics data for vehicle with engine, clutch, gears, autobox. 
Definition: PxVehicleDrive.h:171
 
bool mGearUpPressed
Gear-up digital control value used by vehicle simulation. 
Definition: PxVehicleDrive.h:429
 
A geometry object. 
Definition: PxGeometry.h:75
 
PX_FORCE_INLINE PxReal getAutoBoxSwitchTime() const
Return the time that has passed since the autobox last initiated a gear change. 
Definition: PxVehicleDrive.h:400
 
bool getGearDown() const
Check if the gear-down button has been pressed. 
Definition: PxVehicleDrive.h:243
 
PxU16 PxType
Definition: PxBase.h:49
 
PX_FORCE_INLINE void setGearSwitchTime(const PxReal switchTime)
Definition: PxVehicleDrive.h:486
 
PxReal mEnginespeed
Rotation speed of engine. 
Definition: PxVehicleDrive.h:456
 
PxVehicleDriveDynData mDriveDynData
Dynamics data of vehicle instance. 
Definition: PxVehicleDrive.h:512
 
Output stream class for I/O. 
Definition: PxIO.h:114
 
PX_FORCE_INLINE const PxVehicleEngineData & getEngineData() const
Return the engine data. 
Definition: PxVehicleDrive.h:71
 
PX_FORCE_INLINE void setTargetGear(PxU32 targetGear)
Set the target gear. 
Definition: PxVehicleDrive.h:315
 
Data structure describing non-wheel configuration data of a vehicle that has engine, gears, clutch, and auto-box. 
Definition: PxVehicleDrive.h:56
 
PX_FORCE_INLINE void setAutoBoxSwitchTime(const PxReal autoBoxSwitchTime)
Definition: PxVehicleDrive.h:487
 
PX_FORCE_INLINE void setGearChange(const PxU32 gearChange)
Definition: PxVehicleDrive.h:484
 
virtual bool isKindOf(const char *name) const
Returns whether a given type name matches with the type of this instance. 
Definition: PxVehicleDrive.h:555
 
PX_FORCE_INLINE void toggleAutoGears()
Toggle the auto-gears flag If useAutoGears is true the auto-box will be active. 
Definition: PxVehicleDrive.h:271
 
PX_FORCE_INLINE const PxVehicleAutoBoxData & getAutoBoxData() const
Return the autobox data. 
Definition: PxVehicleDrive.h:113
 
Data structure describing configuration data of a vehicle with up to 20 wheels. 
Definition: PxVehicleWheels.h:123
 
Definition: PxVehicleComponents.h:89
 
PX_FORCE_INLINE const PxVehicleClutchData & getClutchData() const
Return the clutch data. 
Definition: PxVehicleDrive.h:99
 
A complete vehicle with instance dynamics data and configuration data for wheels and engine...
Definition: PxVehicleDrive.h:496
 
PX_FORCE_INLINE const PxVehicleGearsData & getGearsData() const
Return the gears data. 
Definition: PxVehicleDrive.h:85
 
PX_FORCE_INLINE void startGearChange(const PxU32 targetGear)
Start a gear change to a target gear. 
Definition: PxVehicleDrive.h:341
 
PxVehicleDriveSimData()
Definition: PxVehicleDrive.h:159
 
uint8_t PxU8
Definition: PxSimpleTypes.h:75
 
bool isValid() const
Test that all instanced dynamics data and configuration data have legal values. 
 
PxVehicleAutoBoxData mAutoBox
Definition: PxVehicleDrive.h:147
 
PxU32 getNbAnalogInput() const
Definition: PxVehicleDrive.h:483
 
void setGearDown(const bool digitalVal)
Set that the gear-down button has been pressed. 
Definition: PxVehicleDrive.h:225
 
PxVehicleDriveDynData(const PxEMPTY)
Definition: PxVehicleDrive.h:482
 
PX_FORCE_INLINE void setCurrentGear(PxU32 currentGear)
Set the current gear. 
Definition: PxVehicleDrive.h:287
 
PxVehicleClutchData mClutch
Definition: PxVehicleDrive.h:141
 
PX_FORCE_INLINE PxU32 getTargetGear() const
Get the target gear. 
Definition: PxVehicleDrive.h:327
 
#define PX_COMPILE_TIME_ASSERT(exp)
Definition: PxPreprocessor.h:434
 
PX_FORCE_INLINE bool getUseAutoGears() const
Get the flag status that is used to select auto-gears. 
Definition: PxVehicleDrive.h:262
 
PxReal mAutoBoxSwitchTime
Reported time that has passed since last autobox gearup/geardown decision. 
Definition: PxVehicleDrive.h:468
 
PX_FORCE_INLINE void setEngineRotationSpeed(const PxF32 speed)
Set the rotation speed of the engine (radians per second) 
Definition: PxVehicleDrive.h:364
 
PxU32 mTargetGear
Target gear (different from current gear if a gear change is underway) 
Definition: PxVehicleDrive.h:450
 
Data structure with instanced dynamics data and configuration data of a vehicle with just wheels...
Definition: PxVehicleWheels.h:790
 
PxEMPTY
Definition: Px.h:70
 
Definition: PxVehicleComponents.h:347
 
Material class to represent a set of surface properties. 
Definition: PxMaterial.h:143
 
bool isValid() const
Test if the instanced dynamics and configuration data has legal values. 
 
PX_FORCE_INLINE void forceGearChange(const PxU32 targetGear)
Force an immediate gear change to a target gear. 
Definition: PxVehicleDrive.h:353
 
Abstract singleton factory class used for instancing objects in the Physics SDK. 
Definition: PxPhysics.h:71
 
bool getGearUp() const
Check if the gear-up button has been pressed. 
Definition: PxVehicleDrive.h:234
 
Definition: PxVehicleComponents.h:242
 
~PxVehicleDrive()
Definition: PxVehicleDrive.h:554
 
PxVehicleDrive(PxType concreteType, PxBaseFlags baseFlags)
Definition: PxVehicleDrive.h:553
 
bool mGearDownPressed
Gear-down digital control value used by vehicle simulation. 
Definition: PxVehicleDrive.h:438
 
uint32_t PxU32
Definition: Px.h:48
 
Data structure with instanced dynamics data and configuration data of a tank. 
Definition: PxVehicleDriveTank.h:150
 
PX_FORCE_INLINE PxReal getGearSwitchTime() const
Return the time that has passed since the current gear change was initiated. 
Definition: PxVehicleDrive.h:388
 
PxVehicleDriveSimData(const PxEMPTY)
Definition: PxVehicleDrive.h:160
 
PxVehicleEngineData mEngine
Definition: PxVehicleDrive.h:129
 
virtual const char * getConcreteTypeName() const
Returns string name of dynamic type. 
Definition: PxVehicleDrive.h:551
 
PxVehicleDrive(PxBaseFlags baseFlags)
Definition: PxVehicleDrive.h:550
 
PX_FORCE_INLINE void setUseAutoGears(const bool useAutoGears)
Set the flag that will be used to select auto-gears If useAutoGears is true the auto-box will be acti...
Definition: PxVehicleDrive.h:253