|
RavEngine
|
Work items at the beginning of an update step for a PhysX actor based vehicle. More...
#include <PxVehiclePhysXActorComponents.h>
Public Member Functions | |
| 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)=0 |
| Provide vehicle data items for this component. | |
| virtual bool | update (const PxReal dt, const PxVehicleSimulationContext &context) |
| Update function for a vehicle component. | |
Work items at the beginning of an update step for a PhysX actor based vehicle.
Includes:
|
pure virtual |
Provide vehicle data items for this component.
| [out] | axleDescription | identifies the wheels on each axle. |
| [out] | commands | are the brake, throttle and steer values that will drive the vehicle. |
| [out] | transmissionCommands | are 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] | gearParams | The gearbox parameters. Can be set to NULL if the vehicle does not have a gearbox and transmissionCommands is NULL. |
| [out] | gearState | The state of the gearbox. Can be set to NULL if the vehicle does not have a gearbox and transmissionCommands is NULL. |
| [out] | engineParams | The engine parameters. Can be set to NULL if the vehicle does not have an engine. Must be specified, if engineState is specified. |
| [out] | physxActor | is the PxRigidBody instance associated with the vehicle. |
| [out] | physxSteerState | is the previous state of the steer and is used to determine if the steering wheel has changed by comparing with PxVehicleCommandState::steer. |
| [out] | physxConstraints | The 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] | rigidBodyState | is the state of the rigid body used by the Vehicle SDK. |
| [out] | wheelRigidBody1dStates | describes the angular speed of each wheel. |
| [out] | engineState | The engine state. Can be set to NULL if the vehicle does not have an engine. If specified, then engineParams has to be specifed too. |
Implemented in snippetvehicle2::EngineDriveVehicle, and snippetvehicle2::PhysXActorVehicle.
|
inlinevirtual |
Update function for a vehicle component.
| [in] | dt | The timestep size to use for the update step. |
| [in] | context | Vehicle simulation context holding global data or data that usually applies to a large group of vehicles. |
Implements physx::vehicle2::PxVehicleComponent.