RavEngine
Loading...
Searching...
No Matches
snippetvehicle2::PhysXActorVehicle Class Reference
Inheritance diagram for snippetvehicle2::PhysXActorVehicle:
[legend]
Collaboration diagram for snippetvehicle2::PhysXActorVehicle:
[legend]

Public Member Functions

bool initialize (PxPhysics &physics, const PxCookingParams &params, PxMaterial &defaultMaterial)
 
virtual void destroy ()
 
void setUpActor (PxScene &scene, const PxTransform &pose, const char *vehicleName)
 
virtual void getDataForPhysXActorBeginComponent (const PxVehicleAxleDescription *&axleDescription, const PxVehicleCommandState *&commands, const PxVehicleEngineDriveTransmissionCommandState *&transmissionCommands, const PxVehicleGearboxParams *&gearParams, const PxVehicleGearboxState *&gearState, const PxVehicleEngineParams *&engineParams, PxVehiclePhysXActor *&physxActor, PxVehiclePhysXSteerState *&physxSteerState, PxVehiclePhysXConstraints *&physxConstraints, PxVehicleRigidBodyState *&rigidBodyState, PxVehicleArrayData< PxVehicleWheelRigidBody1dState > &wheelRigidBody1dStates, PxVehicleEngineState *&engineState)
 Provide vehicle data items for this component.
 
virtual void getDataForPhysXActorEndComponent (const PxVehicleAxleDescription *&axleDescription, const PxVehicleRigidBodyState *&rigidBodyState, PxVehicleArrayData< const PxVehicleWheelParams > &wheelParams, PxVehicleArrayData< const PxTransform > &wheelShapeLocalPoses, PxVehicleArrayData< const PxVehicleWheelRigidBody1dState > &wheelRigidBody1dStates, PxVehicleArrayData< const PxVehicleWheelLocalPose > &wheelLocalPoses, const PxVehicleGearboxState *&gearState, PxVehiclePhysXActor *&physxActor)
 Provide vehicle data items for this component.
 
virtual void getDataForPhysXConstraintComponent (const PxVehicleAxleDescription *&axleDescription, const PxVehicleRigidBodyState *&rigidBodyState, PxVehicleArrayData< const PxVehicleSuspensionParams > &suspensionParams, PxVehicleArrayData< const PxVehiclePhysXSuspensionLimitConstraintParams > &suspensionLimitParams, PxVehicleArrayData< const PxVehicleSuspensionState > &suspensionStates, PxVehicleArrayData< const PxVehicleSuspensionComplianceState > &suspensionComplianceStates, PxVehicleArrayData< const PxVehicleRoadGeometryState > &wheelRoadGeomStates, PxVehicleArrayData< const PxVehicleTireDirectionState > &tireDirectionStates, PxVehicleArrayData< const PxVehicleTireStickyState > &tireStickyStates, PxVehiclePhysXConstraints *&constraints)
 
virtual void getDataForPhysXRoadGeometrySceneQueryComponent (const PxVehicleAxleDescription *&axleDescription, const PxVehiclePhysXRoadGeometryQueryParams *&roadGeomParams, PxVehicleArrayData< const PxReal > &steerResponseStates, const PxVehicleRigidBodyState *&rigidBodyState, PxVehicleArrayData< const PxVehicleWheelParams > &wheelParams, PxVehicleArrayData< const PxVehicleSuspensionParams > &suspensionParams, PxVehicleArrayData< const PxVehiclePhysXMaterialFrictionParams > &materialFrictionParams, PxVehicleArrayData< PxVehicleRoadGeometryState > &roadGeometryStates, PxVehicleArrayData< PxVehiclePhysXRoadGeometryQueryState > &physxRoadGeometryStates)
 Provide vehicle data items for this component.
 
- Public Member Functions inherited from snippetvehicle2::BaseVehicle
bool initialize ()
 
virtual void initComponentSequence (bool addPhysXBeginEndComponents)=0
 
void step (const PxReal dt, const PxVehicleSimulationContext &context)
 
virtual void getDataForRigidBodyComponent (const PxVehicleAxleDescription *&axleDescription, const PxVehicleRigidBodyParams *&rigidBodyParams, PxVehicleArrayData< const PxVehicleSuspensionForce > &suspensionForces, PxVehicleArrayData< const PxVehicleTireForce > &tireForces, const PxVehicleAntiRollTorque *&antiRollTorque, PxVehicleRigidBodyState *&rigidBodyState)
 Retrieve pointers to the parameter and state data required to update the dynamic state of a rigid body.
 
virtual void getDataForSuspensionComponent (const PxVehicleAxleDescription *&axleDescription, const PxVehicleRigidBodyParams *&rigidBodyParams, const PxVehicleSuspensionStateCalculationParams *&suspensionStateCalculationParams, PxVehicleArrayData< const PxReal > &steerResponseStates, const PxVehicleRigidBodyState *&rigidBodyState, PxVehicleArrayData< const PxVehicleWheelParams > &wheelParams, PxVehicleArrayData< const PxVehicleSuspensionParams > &suspensionParams, PxVehicleArrayData< const PxVehicleSuspensionComplianceParams > &suspensionComplianceParams, PxVehicleArrayData< const PxVehicleSuspensionForceParams > &suspensionForceParams, PxVehicleSizedArrayData< const PxVehicleAntiRollForceParams > &antiRollForceParams, PxVehicleArrayData< const PxVehicleRoadGeometryState > &wheelRoadGeomStates, PxVehicleArrayData< PxVehicleSuspensionState > &suspensionStates, PxVehicleArrayData< PxVehicleSuspensionComplianceState > &suspensionComplianceStates, PxVehicleArrayData< PxVehicleSuspensionForce > &suspensionForces, PxVehicleAntiRollTorque *&antiRollTorque)
 Retrieve pointers to the parameter and state data required to compute the suspension state and the forces/torques that arise from the suspension state.
 
virtual void getDataForTireComponent (const PxVehicleAxleDescription *&axleDescription, PxVehicleArrayData< const PxReal > &steerResponseStates, const PxVehicleRigidBodyState *&rigidBodyState, PxVehicleArrayData< const PxVehicleWheelActuationState > &actuationStates, PxVehicleArrayData< const PxVehicleWheelParams > &wheelParams, PxVehicleArrayData< const PxVehicleSuspensionParams > &suspensionParams, PxVehicleArrayData< const PxVehicleTireForceParams > &tireForceParams, PxVehicleArrayData< const PxVehicleRoadGeometryState > &roadGeomStates, PxVehicleArrayData< const PxVehicleSuspensionState > &suspensionStates, PxVehicleArrayData< const PxVehicleSuspensionComplianceState > &suspensionComplianceStates, PxVehicleArrayData< const PxVehicleSuspensionForce > &suspensionForces, PxVehicleArrayData< const PxVehicleWheelRigidBody1dState > &wheelRigidBody1DStates, PxVehicleArrayData< PxVehicleTireGripState > &tireGripStates, PxVehicleArrayData< PxVehicleTireDirectionState > &tireDirectionStates, PxVehicleArrayData< PxVehicleTireSpeedState > &tireSpeedStates, PxVehicleArrayData< PxVehicleTireSlipState > &tireSlipStates, PxVehicleArrayData< PxVehicleTireCamberAngleState > &tireCamberAngleStates, PxVehicleArrayData< PxVehicleTireStickyState > &tireStickyStates, PxVehicleArrayData< PxVehicleTireForce > &tireForces)
 
virtual void getDataForWheelComponent (const PxVehicleAxleDescription *&axleDescription, PxVehicleArrayData< const PxReal > &steerResponseStates, PxVehicleArrayData< const PxVehicleWheelParams > &wheelParams, PxVehicleArrayData< const PxVehicleSuspensionParams > &suspensionParams, PxVehicleArrayData< const PxVehicleWheelActuationState > &actuationStates, PxVehicleArrayData< const PxVehicleSuspensionState > &suspensionStates, PxVehicleArrayData< const PxVehicleSuspensionComplianceState > &suspensionComplianceStates, PxVehicleArrayData< const PxVehicleTireSpeedState > &tireSpeedStates, PxVehicleArrayData< PxVehicleWheelRigidBody1dState > &wheelRigidBody1dStates, PxVehicleArrayData< PxVehicleWheelLocalPose > &wheelLocalPoses)
 
- Public Member Functions inherited from physx::vehicle2::PxVehicleRigidBodyComponent
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 
- Public Member Functions inherited from physx::vehicle2::PxVehicleSuspensionComponent
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update the suspension state and suspension compliance state and use those updated states to compute suspension and anti-roll forces/torques to apply to the vehicle's rigid body.
 
- Public Member Functions inherited from physx::vehicle2::PxVehicleTireComponent
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 
- Public Member Functions inherited from physx::vehicle2::PxVehicleWheelComponent
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 
- Public Member Functions inherited from physx::vehicle2::PxVehiclePhysXActorBeginComponent
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 
- Public Member Functions inherited from physx::vehicle2::PxVehiclePhysXActorEndComponent
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 
- Public Member Functions inherited from physx::vehicle2::PxVehiclePhysXConstraintComponent
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 
- Public Member Functions inherited from physx::vehicle2::PxVehiclePhysXRoadGeometrySceneQueryComponent
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 

Public Attributes

PhysXIntegrationParams mPhysXParams
 
PhysXIntegrationState mPhysXState
 
PxVehicleCommandState mCommandState
 
- Public Attributes inherited from snippetvehicle2::BaseVehicle
BaseVehicleParams mBaseParams
 
BaseVehicleState mBaseState
 
PxVehicleComponentSequence mComponentSequence
 
PxU8 mComponentSequenceSubstepGroupHandle
 

Member Function Documentation

◆ destroy()

void snippetvehicle2::PhysXActorVehicle::destroy ( )
virtual

Reimplemented from snippetvehicle2::BaseVehicle.

◆ getDataForPhysXActorBeginComponent()

virtual void snippetvehicle2::PhysXActorVehicle::getDataForPhysXActorBeginComponent ( const PxVehicleAxleDescription *&  axleDescription,
const PxVehicleCommandState *&  commands,
const PxVehicleEngineDriveTransmissionCommandState *&  transmissionCommands,
const PxVehicleGearboxParams *&  gearParams,
const PxVehicleGearboxState *&  gearState,
const PxVehicleEngineParams *&  engineParams,
PxVehiclePhysXActor *&  physxActor,
PxVehiclePhysXSteerState *&  physxSteerState,
PxVehiclePhysXConstraints *&  physxConstraints,
PxVehicleRigidBodyState *&  rigidBodyState,
PxVehicleArrayData< PxVehicleWheelRigidBody1dState > &  wheelRigidBody1dStates,
PxVehicleEngineState *&  engineState 
)
inlinevirtual

Provide vehicle data items for this component.

Parameters
[out]axleDescriptionidentifies the wheels on each axle.
[out]commandsare the brake, throttle and steer values that will drive the vehicle.
[out]transmissionCommandsare the target gear and clutch values that will control the transmission. Can be set to NULL if the vehicle does not have a gearbox. If specified, then gearParams and gearState has to be specifed too.
[out]gearParamsThe gearbox parameters. Can be set to NULL if the vehicle does not have a gearbox and transmissionCommands is NULL.
[out]gearStateThe state of the gearbox. Can be set to NULL if the vehicle does not have a gearbox and transmissionCommands is NULL.
[out]engineParamsThe engine parameters. Can be set to NULL if the vehicle does not have an engine. Must be specified, if engineState is specified.
[out]physxActoris the PxRigidBody instance associated with the vehicle.
[out]physxSteerStateis the previous state of the steer and is used to determine if the steering wheel has changed by comparing with PxVehicleCommandState::steer.
[out]physxConstraintsThe state of the suspension limit and low speed tire constraints. If the vehicle actor is sleeping and constraints are active, they will be deactivated and marked as dirty.
[out]rigidBodyStateis the state of the rigid body used by the Vehicle SDK.
[out]wheelRigidBody1dStatesdescribes the angular speed of each wheel.
[out]engineStateThe engine state. Can be set to NULL if the vehicle does not have an engine. If specified, then engineParams has to be specifed too.

Implements physx::vehicle2::PxVehiclePhysXActorBeginComponent.

Reimplemented in snippetvehicle2::EngineDriveVehicle.

◆ getDataForPhysXActorEndComponent()

virtual void snippetvehicle2::PhysXActorVehicle::getDataForPhysXActorEndComponent ( const PxVehicleAxleDescription *&  axleDescription,
const PxVehicleRigidBodyState *&  rigidBodyState,
PxVehicleArrayData< const PxVehicleWheelParams > &  wheelParams,
PxVehicleArrayData< const PxTransform > &  wheelShapeLocalPoses,
PxVehicleArrayData< const PxVehicleWheelRigidBody1dState > &  wheelRigidBody1dStates,
PxVehicleArrayData< const PxVehicleWheelLocalPose > &  wheelLocalPoses,
const PxVehicleGearboxState *&  gearState,
PxVehiclePhysXActor *&  physxActor 
)
inlinevirtual

Provide vehicle data items for this component.

Parameters
[out]axleDescriptionidentifies the wheels on each axle.
[out]rigidBodyStateis the state of the rigid body used by the Vehicle SDK.
[out]wheelParamsdescribes the radius, mass etc. of the wheels.
[out]wheelShapeLocalPosesare the local poses in the wheel's frame to apply to the PxShape instances that represent the wheel
[out]wheelRigidBody1dStatesdescribes the angular speed of the wheels.
[out]wheelLocalPosesdescribes the local poses of the wheels in the rigid body frame.
[out]gearStateThe gear state. Can be set to NULL if the vehicle does not have gears.
[out]physxActoris the PxRigidBody instance associated with the vehicle.

Implements physx::vehicle2::PxVehiclePhysXActorEndComponent.

Reimplemented in snippetvehicle2::EngineDriveVehicle.

◆ getDataForPhysXConstraintComponent()

virtual void snippetvehicle2::PhysXActorVehicle::getDataForPhysXConstraintComponent ( const PxVehicleAxleDescription *&  axleDescription,
const PxVehicleRigidBodyState *&  rigidBodyState,
PxVehicleArrayData< const PxVehicleSuspensionParams > &  suspensionParams,
PxVehicleArrayData< const PxVehiclePhysXSuspensionLimitConstraintParams > &  suspensionLimitParams,
PxVehicleArrayData< const PxVehicleSuspensionState > &  suspensionStates,
PxVehicleArrayData< const PxVehicleSuspensionComplianceState > &  suspensionComplianceStates,
PxVehicleArrayData< const PxVehicleRoadGeometryState > &  wheelRoadGeomStates,
PxVehicleArrayData< const PxVehicleTireDirectionState > &  tireDirectionStates,
PxVehicleArrayData< const PxVehicleTireStickyState > &  tireStickyStates,
PxVehiclePhysXConstraints *&  constraints 
)
inlinevirtual

◆ getDataForPhysXRoadGeometrySceneQueryComponent()

virtual void snippetvehicle2::PhysXActorVehicle::getDataForPhysXRoadGeometrySceneQueryComponent ( const PxVehicleAxleDescription *&  axleDescription,
const PxVehiclePhysXRoadGeometryQueryParams *&  roadGeomParams,
PxVehicleArrayData< const PxReal > &  steerResponseStates,
const PxVehicleRigidBodyState *&  rigidBodyState,
PxVehicleArrayData< const PxVehicleWheelParams > &  wheelParams,
PxVehicleArrayData< const PxVehicleSuspensionParams > &  suspensionParams,
PxVehicleArrayData< const PxVehiclePhysXMaterialFrictionParams > &  materialFrictionParams,
PxVehicleArrayData< PxVehicleRoadGeometryState > &  roadGeometryStates,
PxVehicleArrayData< PxVehiclePhysXRoadGeometryQueryState > &  physxRoadGeometryStates 
)
inlinevirtual

Provide vehicle data items for this component.

Parameters
[out]axleDescriptionidentifies the wheels on each axle.
[out]roadGeomParamsThe road geometry parameters of the vehicle.
[out]steerResponseStatesThe steer response state of the wheels.
[out]rigidBodyStateThe pose, velocity etc. of the vehicle rigid body.
[out]wheelParamsThe wheel parameters for the wheels.
[out]suspensionParamsThe suspension parameters for the wheels.
[out]materialFrictionParamsThe tire friction tables for the wheels.
[out]roadGeometryStatesThe detected ground surface plane, friction value etc. for the wheels.
[out]physxRoadGeometryStatesOptional buffer to store additional information about the query (like actor/shape that got hit etc.). Set to empty if not desired.

Implements physx::vehicle2::PxVehiclePhysXRoadGeometrySceneQueryComponent.


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