Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Friends | List of all members
PxVehicleDriveNW Class Reference

Data structure with instanced dynamics data and configuration data of a vehicle with up to PX_MAX_NB_WHEELS driven wheels. More...

#include <PxVehicleDriveNW.h>

Inheritance diagram for PxVehicleDriveNW:
Inheritance graph
[legend]
Collaboration diagram for PxVehicleDriveNW:
Collaboration graph
[legend]

Public Member Functions

void free ()
 Deallocate a PxVehicleDriveNW instance. More...
 
void setup (PxPhysics *physics, PxRigidDynamic *vehActor, const PxVehicleWheelsSimData &wheelsData, const PxVehicleDriveSimDataNW &driveData, const PxU32 nbWheels)
 Set up a vehicle using simulation data for the wheels and drive model. More...
 
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. More...
 
 PxVehicleDriveNW (PxBaseFlags baseFlags)
 
 PxVehicleDriveNW ()
 
 ~PxVehicleDriveNW ()
 
virtual const char * getConcreteTypeName () const
 Returns string name of dynamic type. More...
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance. More...
 
- Public Member Functions inherited from PxVehicleDrive
 PxVehicleDrive (PxBaseFlags baseFlags)
 
- Public Member Functions inherited from PxVehicleWheels
PX_FORCE_INLINE PxU32 getVehicleType () const
 Return the type of vehicle. More...
 
PX_FORCE_INLINE PxRigidDynamicgetRigidDynamicActor ()
 Get non-const ptr to PxRigidDynamic instance that is the vehicle's physx representation. More...
 
PX_FORCE_INLINE const
PxRigidDynamic
getRigidDynamicActor () const
 Get const ptr to PxRigidDynamic instance that is the vehicle's physx representation. More...
 
PxReal computeForwardSpeed () const
 Compute the rigid body velocity component along the forward vector of the rigid body transform. More...
 
PxReal computeSidewaysSpeed () const
 Compute the rigid body velocity component along the right vector of the rigid body transform. More...
 
virtual void requires (PxProcessPxBaseCallback &c)
 
virtual void exportExtraData (PxSerializationContext &)
 
void importExtraData (PxDeserializationContext &)
 
void resolveReferences (PxDeserializationContext &)
 
PX_FORCE_INLINE PxU32 getNbNonDrivenWheels () const
 
 PxVehicleWheels (PxType concreteType, PxBaseFlags baseFlags)
 
 PxVehicleWheels (PxBaseFlags baseFlags)
 
virtual ~PxVehicleWheels ()
 
virtual void release ()
 Releases the PxBase instance, please check documentation of release in derived class. More...
 
- Public Member Functions inherited from PxBase
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags. More...
 
virtual bool isReleasable () const
 Whether the object is subordinate. More...
 

Static Public Member Functions

static PxVehicleDriveNWallocate (const PxU32 nbWheels)
 Allocate a PxVehicleDriveNW instance for a NWDrive vehicle with nbWheels. More...
 
static PxVehicleDriveNWcreate (PxPhysics *physics, PxRigidDynamic *vehActor, const PxVehicleWheelsSimData &wheelsData, const PxVehicleDriveSimDataNW &driveData, const PxU32 nbWheels)
 Allocate and set up a vehicle using simulation data for the wheels and drive model. More...
 
static PxVehicleDriveNWcreateObject (PxU8 *&address, PxDeserializationContext &context)
 
static void getBinaryMetaData (PxOutputStream &stream)
 
- Static Public Member Functions inherited from PxVehicleDrive
static void getBinaryMetaData (PxOutputStream &stream)
 
- Static Public Member Functions inherited from PxVehicleWheels
static void getBinaryMetaData (PxOutputStream &stream)
 

Public Attributes

PxVehicleDriveSimDataNW mDriveSimData
 Simulation data that describes the configuration of the vehicle's drive model. More...
 
- Public Attributes inherited from PxVehicleDrive
PxVehicleDriveDynData mDriveDynData
 Dynamics data of vehicle instance. More...
 
- Public Attributes inherited from PxVehicleWheels
PxVehicleWheelsSimData mWheelsSimData
 Data describing the setup of all the wheels/suspensions/tires. More...
 
PxVehicleWheelsDynData mWheelsDynData
 Data describing the dynamic state of all wheels/suspension/tires. More...
 

Private Member Functions

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

Friends

class PxVehicleUpdate
 

Additional Inherited Members

- Protected Member Functions inherited from PxVehicleDrive
bool isValid () const
 Test that all instanced dynamics data and configuration data have legal values. More...
 
void setToRestState ()
 Set vehicle to rest. More...
 
void free ()
 Deallocate a PxVehicle4WDrive instance. More...
 
void setup (PxPhysics *physics, PxRigidDynamic *vehActor, const PxVehicleWheelsSimData &wheelsData, const PxU32 nbDrivenWheels, const PxU32 nbNonDrivenWheels)
 
 PxVehicleDrive (PxType concreteType, PxBaseFlags baseFlags)
 
 ~PxVehicleDrive ()
 
- Static Protected Member Functions inherited from PxVehicleDrive
static PxU32 computeByteSize (const PxU32 nbWheels4)
 
static PxU8patchupPointers (PxVehicleDrive *vehDrive, PxU8 *ptr, const PxU32 nbWheels4, const PxU32 nbWheels)
 
- Protected Attributes inherited from PxVehicleWheels
PxRigidDynamicmActor
 The rigid body actor that represents the vehicle in the PhysX SDK. More...
 
PxU8 mType
 Vehicle type (eVehicleDriveTypes) More...
 
PxU8 mPad [14]
 

Detailed Description

Data structure with instanced dynamics data and configuration data of a vehicle with up to PX_MAX_NB_WHEELS driven wheels.

Constructor & Destructor Documentation

PxVehicleDriveNW::PxVehicleDriveNW ( PxBaseFlags  baseFlags)
inline
PxVehicleDriveNW::PxVehicleDriveNW ( )
PxVehicleDriveNW::~PxVehicleDriveNW ( )
inline

Member Function Documentation

static PxVehicleDriveNW* PxVehicleDriveNW::allocate ( const PxU32  nbWheels)
static

Allocate a PxVehicleDriveNW instance for a NWDrive vehicle with nbWheels.

Parameters
[in]nbWheelsis the number of wheels on the vehicle.
Returns
The instantiated vehicle.
See Also
free, setup
static PxVehicleDriveNW* PxVehicleDriveNW::create ( PxPhysics physics,
PxRigidDynamic vehActor,
const PxVehicleWheelsSimData wheelsData,
const PxVehicleDriveSimDataNW driveData,
const PxU32  nbWheels 
)
static

Allocate and set up a vehicle using simulation data for the wheels and drive model.

Parameters
[in]physicsis a PxPhysics instance that is needed to create special vehicle constraints that are maintained by the vehicle.
[in]vehActoris a PxRigidDynamic instance that is used to represent the vehicle in the PhysX SDK.
[in]wheelsDatadescribes the configuration of all suspension/tires/wheels of the vehicle. The vehicle instance takes a copy of this data.
[in]driveDatadescribes the properties of the vehicle's drive model (gears/engine/clutch/differential/autobox). The vehicle instance takes a copy of this data.
[in]nbWheelsis the number of wheels on the vehicle.
Note
It is assumed that the first shapes of the actor are the wheel shapes, followed by the chassis shapes. To break this assumption use PxVehicleWheelsSimData::setWheelShapeMapping.
Returns
The instantiated vehicle.
See Also
allocate, free, setToRestState, PxVehicleWheelsSimData::setWheelShapeMapping
static PxVehicleDriveNW* PxVehicleDriveNW::createObject ( PxU8 *&  address,
PxDeserializationContext context 
)
static
void PxVehicleDriveNW::free ( )

Deallocate a PxVehicleDriveNW instance.

See Also
allocate
static void PxVehicleDriveNW::getBinaryMetaData ( PxOutputStream stream)
static
virtual const char* PxVehicleDriveNW::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of dynamic type.

Returns
Class name of most derived type of this object.

Reimplemented from PxVehicleDrive.

virtual bool PxVehicleDriveNW::isKindOf ( const char *  superClass) const
inlinevirtual

Returns whether a given type name matches with the type of this instance.

Reimplemented from PxVehicleDrive.

References PxBase::isKindOf().

bool PxVehicleDriveNW::isValid ( ) const
private

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

void PxVehicleDriveNW::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.

Note
Calling setToRestState invalidates the cached raycast hit planes under each wheel meaning that suspension line raycasts need to be performed at least once with PxVehicleSuspensionRaycasts before calling PxVehicleUpdates.
See Also
setup, create, PxVehicleSuspensionRaycasts, PxVehicleUpdates
void PxVehicleDriveNW::setup ( PxPhysics physics,
PxRigidDynamic vehActor,
const PxVehicleWheelsSimData wheelsData,
const PxVehicleDriveSimDataNW driveData,
const PxU32  nbWheels 
)

Set up a vehicle using simulation data for the wheels and drive model.

Parameters
[in]physicsis a PxPhysics instance that is needed to create special vehicle constraints that are maintained by the vehicle.
[in]vehActoris a PxRigidDynamic instance that is used to represent the vehicle in the PhysX SDK.
[in]wheelsDatadescribes the configuration of all suspension/tires/wheels of the vehicle. The vehicle instance takes a copy of this data.
[in]driveDatadescribes the properties of the vehicle's drive model (gears/engine/clutch/differential/autobox). The vehicle instance takes a copy of this data.
[in]nbWheelsis the number of wheels on the vehicle.
Note
It is assumed that the first shapes of the actor are the wheel shapes, followed by the chassis shapes. To break this assumption use PxVehicleWheelsSimData::setWheelShapeMapping.
See Also
allocate, free, setToRestState, PxVehicleWheelsSimData::setWheelShapeMapping

Friends And Related Function Documentation

friend class PxVehicleUpdate
friend

Member Data Documentation

PxVehicleDriveSimDataNW PxVehicleDriveNW::mDriveSimData

Simulation data that describes the configuration of the vehicle's drive model.

See Also
setup, create

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


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com