#include <PxVehicleDriveTank.h>
Public Member Functions | |
void | free () |
Deallocate a PxVehicleDriveTank instance. | |
void | setup (PxPhysics *physics, PxRigidDynamic *vehActor, const PxVehicleWheelsSimData &wheelsData, const PxVehicleDriveSimData &driveData, const PxU32 nbDrivenWheels) |
Set up a tank using simulation data for the wheels and drive model. | |
void | setDriveModel (const PxVehicleDriveTankControlModel::Enum driveModel) |
Set the control model used by the tank. | |
PxVehicleDriveTankControlModel::Enum | getDriveModel () const |
Return the control model used by the tank. | |
void | setToRestState () |
Set a vehicle to its rest state. Aside from the rigid body transform, this will set the vehicle and rigid body to the state they were in immediately after setup or create. | |
PxVehicleDriveTank (PxBaseFlags baseFlags) | |
virtual const char * | getConcreteTypeName () const |
Returns string name of dynamic type. | |
virtual bool | isKindOf (const char *name) const |
Returns whether a given type name matches with the type of this instance. | |
Static Public Member Functions | |
static PxVehicleDriveTank * | allocate (const PxU32 nbWheels) |
Allocate a PxVehicleTankDrive instance for a tank with nbWheels. | |
static PxVehicleDriveTank * | create (PxPhysics *physics, PxRigidDynamic *vehActor, const PxVehicleWheelsSimData &wheelsData, const PxVehicleDriveSimData &driveData, const PxU32 nbDrivenWheels) |
Allocate and set up a tank using simulation data for the wheels and drive model. | |
static PxVehicleDriveTank * | createObject (PxU8 *&address, PxDeserializationContext &context) |
static void | getBinaryMetaData (PxOutputStream &stream) |
Public Attributes | |
PxVehicleDriveSimData | mDriveSimData |
Simulation data that models vehicle components. | |
Protected Member Functions | |
PxVehicleDriveTank () | |
~PxVehicleDriveTank () | |
Private Member Functions | |
bool | isValid () const |
Test if the instanced dynamics and configuration data has legal values. | |
Private Attributes | |
PxVehicleDriveTankControlModel::Enum | mDriveModel |
Drive model. | |
PxU32 | mPad [3] |
Friends | |
class | PxVehicleUpdate |
PxVehicleDriveTank::PxVehicleDriveTank | ( | PxBaseFlags | baseFlags | ) | [inline] |
PxVehicleDriveTank::PxVehicleDriveTank | ( | ) | [protected] |
PxVehicleDriveTank::~PxVehicleDriveTank | ( | ) | [inline, protected] |
static PxVehicleDriveTank* PxVehicleDriveTank::allocate | ( | const PxU32 | nbWheels | ) | [static] |
static PxVehicleDriveTank* PxVehicleDriveTank::create | ( | PxPhysics * | physics, | |
PxRigidDynamic * | vehActor, | |||
const PxVehicleWheelsSimData & | wheelsData, | |||
const PxVehicleDriveSimData & | driveData, | |||
const PxU32 | nbDrivenWheels | |||
) | [static] |
Allocate and set up a tank using simulation data for the wheels and drive model.
[in] | physics | is a PxPhysics instance that is needed to create special vehicle constraints that are maintained by the tank. |
[in] | vehActor | is a PxRigidDynamic instance that is used to represent the tank in the PhysX SDK. |
[in] | wheelsData | describes the configuration of all suspension/tires/wheels of the tank. The tank instance takes a copy of this data. |
[in] | driveData | describes the properties of the tank's drive model (gears/engine/clutch/differential/autobox). The tank instance takes a copy of this data. |
[in] | nbDrivenWheels | is the number of wheels on the tank. |
static PxVehicleDriveTank* PxVehicleDriveTank::createObject | ( | PxU8 *& | address, | |
PxDeserializationContext & | context | |||
) | [static] |
void PxVehicleDriveTank::free | ( | ) |
static void PxVehicleDriveTank::getBinaryMetaData | ( | PxOutputStream & | stream | ) | [static] |
Reimplemented from PxVehicleDrive.
virtual const char* PxVehicleDriveTank::getConcreteTypeName | ( | ) | const [inline, virtual] |
Returns string name of dynamic type.
Reimplemented from PxVehicleDrive.
PxVehicleDriveTankControlModel::Enum PxVehicleDriveTank::getDriveModel | ( | ) | const [inline] |
Return the control model used by the tank.
virtual bool PxVehicleDriveTank::isKindOf | ( | const char * | superClass | ) | const [inline, virtual] |
Returns whether a given type name matches with the type of this instance.
Reimplemented from PxVehicleDrive.
References PxBase::isKindOf().
bool PxVehicleDriveTank::isValid | ( | ) | const [private] |
Test if the instanced dynamics and configuration data has legal values.
Reimplemented from PxVehicleDrive.
void PxVehicleDriveTank::setDriveModel | ( | const PxVehicleDriveTankControlModel::Enum | driveModel | ) | [inline] |
Set the control model used by the tank.
eDRIVE_MODEL_SPECIAL: turning achieved by accelerating forwards on one side, accelerating backwards on the other side.
The default value is eDRIVE_MODEL_STANDARD
void PxVehicleDriveTank::setToRestState | ( | ) |
Set a vehicle to its rest state. Aside from the rigid body transform, this will set the vehicle and rigid body to the state they were in immediately after setup or create.
Reimplemented from PxVehicleDrive.
void PxVehicleDriveTank::setup | ( | PxPhysics * | physics, | |
PxRigidDynamic * | vehActor, | |||
const PxVehicleWheelsSimData & | wheelsData, | |||
const PxVehicleDriveSimData & | driveData, | |||
const PxU32 | nbDrivenWheels | |||
) |
Set up a tank using simulation data for the wheels and drive model.
[in] | physics | is a PxPhysics instance that is needed to create special vehicle constraints that are maintained by the vehicle. |
[in] | vehActor | is a PxRigidDynamic instance that is used to represent the tank in the PhysX SDK. |
[in] | wheelsData | describes the configuration of all suspension/tires/wheels of the tank. The tank instance takes a copy of this data. |
[in] | driveData | describes the properties of the tank's drive model (gears/engine/clutch/autobox). The tank instance takes a copy of this data. |
[in] | nbDrivenWheels | is the number of wheels on the tank. |
The wheels must be arranged according to PxVehicleDriveTankWheelOrder; that is, the even wheels are on the left side of the tank and the odd wheels are on the right side of the tank.
friend class PxVehicleUpdate [friend] |
Reimplemented from PxVehicleDrive.
PxU32 PxVehicleDriveTank::mPad[3] [private] |
Reimplemented from PxVehicleWheels.