PhysX SDK 3.2 API Reference: PxVehicleDriveTank Class Reference

PhysX SDK 3.2 API

PxVehicleDriveTank Class Reference
[Vehicle]

Data structure with instanced dynamics data and configuration data of a tank. More...

#include <PxVehicleDriveTank.h>

Inheritance diagram for PxVehicleDriveTank:
Collaboration diagram for PxVehicleDriveTank:

List of all members.


Public Types

enum  eWheelOrdering {
  eTANK_WHEEL_FRONT_LEFT = 0,
  eTANK_WHEEL_FRONT_RIGHT,
  eTANK_WHEEL_1ST_FROM_FRONT_LEFT,
  eTANK_WHEEL_1ST_FROM_FRONT_RIGHT,
  eTANK_WHEEL_2ND_FROM_FRONT_LEFT,
  eTANK_WHEEL_2ND_FROM_FRONT_RIGHT,
  eTANK_WHEEL_3RD_FROM_FRONT_LEFT,
  eTANK_WHEEL_3RD_FROM_FRONT_RIGHT,
  eTANK_WHEEL_4TH_FROM_FRONT_LEFT,
  eTANK_WHEEL_4TH_FROM_FRONT_RIGHT,
  eTANK_WHEEL_5TH_FROM_FRONT_LEFT,
  eTANK_WHEEL_5TH_FROM_FRONT_RIGHT,
  eTANK_WHEEL_6TH_FROM_FRONT_LEFT,
  eTANK_WHEEL_6TH_FROM_FRONT_RIGHT,
  eTANK_WHEEL_7TH_FROM_FRONT_LEFT,
  eTANK_WHEEL_7TH_FROM_FRONT_RIGHT,
  eTANK_WHEEL_8TH_FROM_FRONT_LEFT,
  eTANK_WHEEL_8TH_FROM_FRONT_RIGHT,
  eTANK_WHEEL_9TH_FROM_FRONT_LEFT,
  eTANK_WHEEL_9TH_FROM_FRONT_RIGHT
}
 The ordering of the driven wheels. More...
enum  {
  eANALOG_INPUT_ACCEL = PxVehicleDriveDynData::eANALOG_INPUT_ACCEL,
  eANALOG_INPUT_BRAKE_LEFT,
  eANALOG_INPUT_BRAKE_RIGHT,
  eANALOG_INPUT_THRUST_LEFT,
  eANALOG_INPUT_THRUST_RIGHT,
  eMAX_NUM_DRIVETANK_ANALOG_INPUTS
}
enum  eDriveModel {
  eDRIVE_MODEL_STANDARD = 0,
  eDRIVE_MODEL_SPECIAL
}
 Two driving models supported. More...

Public Member Functions

void free ()
 Deallocate a PxVehicleDriveTank instance.
void setup (PxPhysics *physics, PxRigidDynamic *vehActor, const PxVehicleWheelsSimData &wheelsData, const PxVehicleDriveSimData &driveData, const PxU32 numDrivenWheels)
 Set up a tank with.
void setDriveModel (const eDriveModel driveModel)
 Set driving model.
eDriveModel getDriveModel () const
 Return the driving model.
void setToRestState ()
 Set a vehicle to its rest state.

Static Public Member Functions

static PxVehicleDriveTankallocate (const PxU32 numWheels)
 Allocate a PxVehicleTankDrive instance for a tank with numWheels.
static PxVehicleDriveTankcreate (PxPhysics *physics, PxRigidDynamic *vehActor, const PxVehicleWheelsSimData &wheelsData, const PxVehicleDriveSimData &driveData, const PxU32 numDrivenWheels)
 Create a tank with.

Public Attributes

PxVehicleDriveSimData mDriveSimData
 Simulation data that models vehicle components.

Private Member Functions

 PxVehicleDriveTank ()
 ~PxVehicleDriveTank ()
bool isValid () const
 Test if the instanced dynamics and configuration data has legal values.

Private Attributes

eDriveModel mDriveModel
 Drive model.
PxU32 mPad [3]

Friends

class PxVehicleUpdate

Detailed Description

Data structure with instanced dynamics data and configuration data of a tank.

Member Enumeration Documentation

anonymous enum

See also:
PxVehicleDrive::setAnalogInput, PxVehicleDrive::getAnalogInput
Enumerator:
eANALOG_INPUT_ACCEL 
eANALOG_INPUT_BRAKE_LEFT 
eANALOG_INPUT_BRAKE_RIGHT 
eANALOG_INPUT_THRUST_LEFT 
eANALOG_INPUT_THRUST_RIGHT 
eMAX_NUM_DRIVETANK_ANALOG_INPUTS 

Two driving models supported.

See also:
setDrivingModel
Enumerator:
eDRIVE_MODEL_STANDARD 
eDRIVE_MODEL_SPECIAL 

The ordering of the driven wheels.

Enumerator:
eTANK_WHEEL_FRONT_LEFT 
eTANK_WHEEL_FRONT_RIGHT 
eTANK_WHEEL_1ST_FROM_FRONT_LEFT 
eTANK_WHEEL_1ST_FROM_FRONT_RIGHT 
eTANK_WHEEL_2ND_FROM_FRONT_LEFT 
eTANK_WHEEL_2ND_FROM_FRONT_RIGHT 
eTANK_WHEEL_3RD_FROM_FRONT_LEFT 
eTANK_WHEEL_3RD_FROM_FRONT_RIGHT 
eTANK_WHEEL_4TH_FROM_FRONT_LEFT 
eTANK_WHEEL_4TH_FROM_FRONT_RIGHT 
eTANK_WHEEL_5TH_FROM_FRONT_LEFT 
eTANK_WHEEL_5TH_FROM_FRONT_RIGHT 
eTANK_WHEEL_6TH_FROM_FRONT_LEFT 
eTANK_WHEEL_6TH_FROM_FRONT_RIGHT 
eTANK_WHEEL_7TH_FROM_FRONT_LEFT 
eTANK_WHEEL_7TH_FROM_FRONT_RIGHT 
eTANK_WHEEL_8TH_FROM_FRONT_LEFT 
eTANK_WHEEL_8TH_FROM_FRONT_RIGHT 
eTANK_WHEEL_9TH_FROM_FRONT_LEFT 
eTANK_WHEEL_9TH_FROM_FRONT_RIGHT 


Constructor & Destructor Documentation

PxVehicleDriveTank::PxVehicleDriveTank (  )  [inline, private]

PxVehicleDriveTank::~PxVehicleDriveTank (  )  [inline, private]


Member Function Documentation

static PxVehicleDriveTank* PxVehicleDriveTank::allocate ( const PxU32  numWheels  )  [static]

Allocate a PxVehicleTankDrive instance for a tank with numWheels.

It is assumed that all wheels are driven wheels.

See also:
free, setup

static PxVehicleDriveTank* PxVehicleDriveTank::create ( PxPhysics physics,
PxRigidDynamic vehActor,
const PxVehicleWheelsSimData wheelsData,
const PxVehicleDriveSimData driveData,
const PxU32  numDrivenWheels 
) [static]

Create a tank with.

(i) a PxPhysics instance - needed to setup special vehicle constraints maintained by the vehicle. (ii) a PxRigidDynamic instance - the rigid body representation of the tank in the physx sdk. (iii)a PxVehicleWheelsSimData instance describing the wheel/suspension/tires - the tank instance takes a copy of this input data. (iv) a PxVehicleDriveSimData instance describing the drive data - the tank instance takes a copy of this input data. (v) the number of driven wheels (the number of tank wheels) (vi) it is assumed that the first numDrivenWheel shapes of vehActor correspond to the wheel shapes of the tank (vii)it is assumed that the even-numbered wheel shapes are the left-hand wheels ordered in sequence from front to back (viii)it is assumed that the odd-numbered wheel shapes are the right-hand wheels ordered in sequence from front to back (ix) it is assumed that the N non-driven wheel shapes are shapes 4 -> 4+N-1 of the actor. (x) it is assumed that the ordering of the wheel shapes in the actor matches the ordering in PxVehicleWheelsSimData. (xi) to break assumptions (vi)-(x) see PxVehicleWheels::setWheelShapeMapping

See also:
free, setToRestState, setup

void PxVehicleDriveTank::free (  ) 

Deallocate a PxVehicleDriveTank instance.

See also:
allocate

Reimplemented from PxVehicleDrive.

eDriveModel PxVehicleDriveTank::getDriveModel (  )  const [inline]

Return the driving model.

bool PxVehicleDriveTank::isValid (  )  const [private]

Test if the instanced dynamics and configuration data has legal values.

Reimplemented from PxVehicleDrive.

void PxVehicleDriveTank::setDriveModel ( const eDriveModel  driveModel  )  [inline]

Set driving model.

eDRIVE_MODEL_STANDARD: turning achieved by braking on one side, accelerating on the other side. eDRIVE_MODEL_SPECIAL: turning achieved by accelerating forwards on one side, accelerating backwards on the other side. default value is eDRIVE_MODEL_STANDARD

void PxVehicleDriveTank::setToRestState (  ) 

Set a vehicle to its rest state.

Call after setup

See also:
setup

Reimplemented from PxVehicleDrive.

void PxVehicleDriveTank::setup ( PxPhysics physics,
PxRigidDynamic vehActor,
const PxVehicleWheelsSimData wheelsData,
const PxVehicleDriveSimData driveData,
const PxU32  numDrivenWheels 
)

Set up a tank with.

(i) a PxPhysics instance - needed to setup special vehicle constraints maintained by the vehicle. (ii) a PxRigidDynamic instance - the rigid body representation of the tank in the physx sdk. (iii)a PxVehicleWheelsSimData instance describing the wheel/suspension/tires - the tank instance takes a copy of this input data. (iv) a PxVehicleDriveSimData instance describing the drive data - the tank instance takes a copy of this input data. (v) the number of driven wheels. (vi) it is assumed that the first numDrivenWheel shapes of vehActor correspond to the wheel shapes of the tank (vii)it is assumed that the even-numbered wheel shapes are the left-hand wheels ordered in sequence from front to back (viii)it is assumed that the odd-numbered wheel shapes are the right-hand wheels ordered in sequence from front to back (ix) it is assumed that the N non-driven wheel shapes are shapes 4 -> 4+N-1 of the actor. (x) it is assumed that the ordering of the wheel shapes in the actor matches the ordering in PxVehicleWheelsSimData. (xi) to break assumpgions (vi)-(x) see PxVehicleWheels::setWheelShapeMapping

See also:
allocate, free, setToRestState, eWheelOrdering


Friends And Related Function Documentation

friend class PxVehicleUpdate [friend]

Reimplemented from PxVehicleDrive.


Member Data Documentation

Simulation data that models vehicle components.

See also:
setup

Reimplemented from PxVehicleWheels.


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