PxVehicleWheels Class Reference

Data structure with instanced dynamics data and configuration data of a vehicle with just wheels. More...

#include <PxVehicleWheels.h>

Inheritance diagram for PxVehicleWheels:
Collaboration diagram for PxVehicleWheels:

Public Member Functions

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 PxRigidDynamicgetRigidDynamicActor () 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 requiresObjects (PxProcessPxBaseCallback &c)
 
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...
 
virtual void preExportDataReset ()
 
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_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object. More...
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag. More...
 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags. More...
 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags. More...
 
virtual bool isReleasable () const
 Whether the object is subordinate. More...
 

Static Public Member Functions

static void getBinaryMetaData (PxOutputStream &stream)
 

Public Attributes

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...
 

Protected Member Functions

void setToRestState ()
 Set all wheels to their rest state. More...
 
bool isValid () const
 Test that all configuration and instanced dynamics data is valid. More...
 
virtual void init (const PxU32 numWheels)
 
void free ()
 Deallocate a PxVehicleWheels instance. More...
 
void onConstraintRelease ()
 
void setup (PxPhysics *physics, PxRigidDynamic *vehActor, const PxVehicleWheelsSimData &wheelsData, const PxU32 nbDrivenWheels, const PxU32 nbNonDrivenWheels)
 
- Protected Member Functions inherited from PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags. More...
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags. More...
 
virtual ~PxBase ()
 Destructor. More...
 
template<class T >
bool typeMatch () const
 

Static Protected Member Functions

static PxU32 computeByteSize (const PxU32 nbWheels)
 
static PxU8 * patchupPointers (const PxU32 nbWheels, PxVehicleWheels *vehWheels, PxU8 *ptr)
 

Protected Attributes

PxRigidDynamicmActor
 The rigid body actor that represents the vehicle in the PhysX SDK. More...
 
PxU8 mType
 Vehicle type (eVehicleDriveTypes) More...
 
PxU8 mPad0 [14]
 
- Protected Attributes inherited from PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 

Private Attributes

PxU32 mNbNonDrivenWheels
 Count the number of constraint connectors that have hit their callback when deleting a vehicle. Can only delete the vehicle's memory when all constraint connectors have hit their callback. More...
 
PxU8 mOnConstraintReleaseCounter
 

Friends

class PxVehicleUpdate
 
class PxVehicleConstraintShader
 

Detailed Description

Data structure with instanced dynamics data and configuration data of a vehicle with just wheels.

See also
PxVehicleDrive, PxVehicleDrive4W, PxVehicleDriveTank

Constructor & Destructor Documentation

◆ PxVehicleWheels() [1/2]

PxVehicleWheels::PxVehicleWheels ( PxType  concreteType,
PxBaseFlags  baseFlags 
)
inline

◆ PxVehicleWheels() [2/2]

PxVehicleWheels::PxVehicleWheels ( PxBaseFlags  baseFlags)
inline

◆ ~PxVehicleWheels()

virtual PxVehicleWheels::~PxVehicleWheels ( )
inlinevirtual

Member Function Documentation

◆ computeByteSize()

static PxU32 PxVehicleWheels::computeByteSize ( const PxU32  nbWheels)
staticprotected

◆ computeForwardSpeed()

PxReal PxVehicleWheels::computeForwardSpeed ( ) const

Compute the rigid body velocity component along the forward vector of the rigid body transform.

See also
PxVehicleSetBasisVectors

◆ computeSidewaysSpeed()

PxReal PxVehicleWheels::computeSidewaysSpeed ( ) const

Compute the rigid body velocity component along the right vector of the rigid body transform.

See also
PxVehicleSetBasisVectors

◆ exportExtraData()

virtual void PxVehicleWheels::exportExtraData ( PxSerializationContext )
virtual

Reimplemented in PxVehicleNoDrive.

◆ free()

void PxVehicleWheels::free ( )
protected

◆ getBinaryMetaData()

static void PxVehicleWheels::getBinaryMetaData ( PxOutputStream stream)
static

◆ getConcreteTypeName()

virtual const char* PxVehicleWheels::getConcreteTypeName ( ) const
inlinevirtual

Returns string name of dynamic type.

Returns
Class name of most derived type of this object.

Implements PxBase.

Reimplemented in PxVehicleDrive, PxVehicleDrive4W, PxVehicleDriveTank, PxVehicleDriveNW, and PxVehicleNoDrive.

◆ getNbNonDrivenWheels()

PX_FORCE_INLINE PxU32 PxVehicleWheels::getNbNonDrivenWheels ( ) const
inline

◆ getRigidDynamicActor() [1/2]

PX_FORCE_INLINE PxRigidDynamic* PxVehicleWheels::getRigidDynamicActor ( )
inline

Get non-const ptr to PxRigidDynamic instance that is the vehicle's physx representation.

◆ getRigidDynamicActor() [2/2]

PX_FORCE_INLINE const PxRigidDynamic* PxVehicleWheels::getRigidDynamicActor ( ) const
inline

Get const ptr to PxRigidDynamic instance that is the vehicle's physx representation.

◆ getVehicleType()

PX_FORCE_INLINE PxU32 PxVehicleWheels::getVehicleType ( ) const
inline

Return the type of vehicle.

See also
PxVehicleTypes

◆ importExtraData()

void PxVehicleWheels::importExtraData ( PxDeserializationContext )

◆ init()

virtual void PxVehicleWheels::init ( const PxU32  numWheels)
protectedvirtual

Reimplemented in PxVehicleDrive.

◆ isKindOf()

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

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

Reimplemented from PxBase.

Reimplemented in PxVehicleDrive, PxVehicleDriveTank, PxVehicleDrive4W, PxVehicleDriveNW, and PxVehicleNoDrive.

References PxBase::isKindOf().

◆ isValid()

bool PxVehicleWheels::isValid ( ) const
protected

Test that all configuration and instanced dynamics data is valid.

◆ onConstraintRelease()

void PxVehicleWheels::onConstraintRelease ( )
protected

◆ patchupPointers()

static PxU8* PxVehicleWheels::patchupPointers ( const PxU32  nbWheels,
PxVehicleWheels vehWheels,
PxU8 *  ptr 
)
staticprotected

◆ preExportDataReset()

virtual void PxVehicleWheels::preExportDataReset ( )
inlinevirtual

◆ release()

virtual void PxVehicleWheels::release ( )
inlinevirtual

Releases the PxBase instance, please check documentation of release in derived class.

Implements PxBase.

◆ requiresObjects()

virtual void PxVehicleWheels::requiresObjects ( PxProcessPxBaseCallback c)
virtual

◆ resolveReferences()

void PxVehicleWheels::resolveReferences ( PxDeserializationContext )

◆ setToRestState()

void PxVehicleWheels::setToRestState ( )
protected

Set all wheels to their rest state.

◆ setup()

void PxVehicleWheels::setup ( PxPhysics physics,
PxRigidDynamic vehActor,
const PxVehicleWheelsSimData wheelsData,
const PxU32  nbDrivenWheels,
const PxU32  nbNonDrivenWheels 
)
protected

Friends And Related Function Documentation

◆ PxVehicleConstraintShader

friend class PxVehicleConstraintShader
friend

◆ PxVehicleUpdate

friend class PxVehicleUpdate
friend

Member Data Documentation

◆ mActor

PxRigidDynamic* PxVehicleWheels::mActor
protected

The rigid body actor that represents the vehicle in the PhysX SDK.

◆ mNbNonDrivenWheels

PxU32 PxVehicleWheels::mNbNonDrivenWheels
private

Count the number of constraint connectors that have hit their callback when deleting a vehicle. Can only delete the vehicle's memory when all constraint connectors have hit their callback.

◆ mOnConstraintReleaseCounter

PxU8 PxVehicleWheels::mOnConstraintReleaseCounter
private

◆ mPad0

PxU8 PxVehicleWheels::mPad0[14]
protected

◆ mType

PxU8 PxVehicleWheels::mType
protected

Vehicle type (eVehicleDriveTypes)

◆ mWheelsDynData

PxVehicleWheelsDynData PxVehicleWheels::mWheelsDynData

Data describing the dynamic state of all wheels/suspension/tires.

◆ mWheelsSimData

PxVehicleWheelsSimData PxVehicleWheels::mWheelsSimData

Data describing the setup of all the wheels/suspensions/tires.


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