Defined in include/vehicle2/drivetrain/PxVehicleDrivetrainComponents.h

Inheritance Relationships

Base Type

class PxVehicleEngineDriveCommandResponseComponent : public PxVehicleComponent

Forward the applicable set of control values for a vehicle driven by an engine to a command response state for each applicable control value.

If parameters for an autobox are provided, the autobox will determine if a gear change should begin in order to maintain a desired engine revs.

See also


See also


See also


Public Functions

inline PxVehicleEngineDriveCommandResponseComponent()
inline virtual ~PxVehicleEngineDriveCommandResponseComponent()
virtual void getDataForEngineDriveCommandResponseComponent(const PxVehicleAxleDescription *&axleDescription, PxVehicleSizedArrayData<const PxVehicleBrakeCommandResponseParams> &brakeResponseParams, const PxVehicleSteerCommandResponseParams *&steerResponseParams, PxVehicleSizedArrayData<const PxVehicleAckermannParams> &ackermannParams, const PxVehicleGearboxParams *&gearboxParams, const PxVehicleClutchCommandResponseParams *&clutchResponseParams, const PxVehicleEngineParams *&engineParams, const PxVehicleRigidBodyState *&rigidBodyState, const PxVehicleEngineState *&engineState, const PxVehicleAutoboxParams *&autoboxParams, const PxVehicleCommandState *&commands, const PxVehicleEngineDriveTransmissionCommandState *&transmissionCommands, PxVehicleArrayData<PxReal> &brakeResponseStates, PxVehicleEngineDriveThrottleCommandResponseState *&throttleResponseState, PxVehicleArrayData<PxReal> &steerResponseStates, PxVehicleGearboxState *&gearboxResponseState, PxVehicleClutchCommandResponseState *&clutchResponseState, PxVehicleAutoboxState *&autoboxState) = 0

Provide vehicle data items for this component.

  • axleDescription[out] identifies the wheels on each axle.

  • brakeResponseParams[out] An array of brake response parameters with a brake response for each brake command.

  • steerResponseParams[out] The steer response parameters.

  • ackermannParams[out] The parameters defining Ackermann steering. NULL if no Ackermann steering is desired.

  • gearboxParams[out] The gearbox parameters.

  • clutchResponseParams[out] The clutch response parameters.

  • engineParams[out] The engine parameters. Only needed if an autobox is provided (see autoboxParams), else it can be set to NULL.

  • engineState[out] The engine state. Only needed if an autobox is provided (see autoboxParams), else it can be set to NULL.

  • autoboxParams[out] The autobox parameters. If not NULL, the autobox will determine the target gear. Requires the parameters engineParams, engineState and autoboxState to be available. If no autobox is desired, NULL can be used in which case the aforementioned additional parameters can be set to NULL too.

  • rigidBodyState[out] The state of the vehicle’s rigid body.

  • commands[out] The throttle, brake, steer etc. command states.

  • transmissionCommands[out] The clutch, target gear etc. command states. If an autobox is provided (see autoboxParams) and the target gear is set to PxVehicleEngineDriveTransmissionCommandState::eAUTOMATIC_GEAR, then the autobox will trigger gear shifts.

  • brakeResponseStates[out] The resulting brake response states given the command input and brake response parameters.

  • throttleResponseState[out] The resulting throttle response to the input throttle command.

  • steerResponseStates[out] The resulting steer response states given the command input, steer response and (optionally) Ackermann parameters.

  • gearboxResponseState[out] The resulting gearbox response state given the command input and gearbox parameters.

  • clutchResponseState[out] The resulting clutch state given the command input and clutch response parameters.

  • autoboxState[out] The resulting autobox state given the autobox/engine/gear params and engine state. Only needed if an autobox is provided (see autoboxParams), else it can be set to NULL.

inline virtual bool update(const PxReal dt, const PxVehicleSimulationContext &context)

Update function for a vehicle component.

  • dt[in] The timestep size to use for the update step.

  • context[in] Vehicle simulation context holding global data or data that usually applies to a large group of vehicles.


True if subsequent components in a sequence should get updated, false if the sequence should be aborted.