RavEngine
Loading...
Searching...
No Matches
physx::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 physx::PxVehicleWheels:
[legend]
Collaboration diagram for physx::PxVehicleWheels:
[legend]

Public Member Functions

PX_FORCE_INLINE PxU32 getVehicleType () const
 Return the type of vehicle.
 
PX_FORCE_INLINE PxRigidDynamic * getRigidDynamicActor ()
 Get non-const ptr to PxRigidDynamic instance that is the vehicle's physx representation.
 
PX_FORCE_INLINE const PxRigidDynamic * getRigidDynamicActor () const
 Get const ptr to PxRigidDynamic instance that is the vehicle's physx representation.
 
PxReal computeForwardSpeed (const PxVec3 &forwardAxis=PxVehicleGetDefaultContext().forwardAxis) const
 Compute the rigid body velocity component along the forward vector of the rigid body transform.
 
PxReal computeSidewaysSpeed (const PxVec3 &sideAxis=PxVehicleGetDefaultContext().sideAxis) const
 Compute the rigid body velocity component along the right vector of the rigid body transform.
 
virtual void requiresObjects (PxProcessPxBaseCallback &c)
 
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.
 
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 void release ()
 Releases the PxBase instance, please check documentation of release in derived class.
 
- Public Member Functions inherited from physx::PxBase
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object.
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag

 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags

 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags.
 
virtual bool isReleasable () const
 Whether the object is subordinate.
 

Static Public Member Functions

static void getBinaryMetaData (PxOutputStream &stream)
 

Public Attributes

PxVehicleWheelsSimData mWheelsSimData
 Data describing the setup of all the wheels/suspensions/tires.
 
PxVehicleWheelsDynData mWheelsDynData
 Data describing the dynamic state of all wheels/suspension/tires.
 

Protected Member Functions

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

PxRigidDynamic * mActor
 The rigid body actor that represents the vehicle in the PhysX SDK.
 
PxU8 mType
 Vehicle type (eVehicleDriveTypes)
 
PxU8 mPad0 [8]
 
- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 

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

Member Function Documentation

◆ computeByteSize()

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

◆ computeForwardSpeed()

PxReal physx::PxVehicleWheels::computeForwardSpeed ( const PxVec3 &  forwardAxis = PxVehicleGetDefaultContext().forwardAxis) const

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

Parameters
[in]forwardAxisThe axis denoting the local space forward direction of the vehicle.
See also
PxVehicleSetBasisVectors

◆ computeSidewaysSpeed()

PxReal physx::PxVehicleWheels::computeSidewaysSpeed ( const PxVec3 &  sideAxis = PxVehicleGetDefaultContext().sideAxis) const

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

Parameters
[in]sideAxisThe axis denoting the local space side direction of the vehicle.
See also
PxVehicleSetBasisVectors

◆ free()

void physx::PxVehicleWheels::free ( )
protected

◆ getConcreteTypeName()

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

Returns string name of dynamic type.

Returns
Class name of most derived type of this object.

Implements physx::PxBase.

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

◆ getVehicleType()

PX_FORCE_INLINE PxU32 physx::PxVehicleWheels::getVehicleType ( ) const
inline

Return the type of vehicle.

See also
PxVehicleTypes

◆ isKindOf()

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

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

Reimplemented from physx::PxBase.

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

◆ release()

virtual void physx::PxVehicleWheels::release ( )
inlinevirtual

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

Implements physx::PxBase.

◆ setup()

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

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