RavEngine
Loading...
Searching...
No Matches
physx::vehicle2::PxVehicleEngineDriveCommandResponseComponent Class Referenceabstract

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

#include <PxVehicleDrivetrainComponents.h>

Inheritance diagram for physx::vehicle2::PxVehicleEngineDriveCommandResponseComponent:
[legend]
Collaboration diagram for physx::vehicle2::PxVehicleEngineDriveCommandResponseComponent:
[legend]

Public Member Functions

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.
 
virtual bool update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update function for a vehicle component.
 

Detailed Description

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
PxVehicleBrakeCommandLinearUpdate
PxVehicleClutchCommandResponseLinearUpdate
PxVehicleEngineDriveThrottleCommandResponseUpdate
PxVehicleSteerCommandLinearUpdate
PxVehicleAckermannSteerUpdate
PxVehicleAutoBoxUpdate
PxVehicleGearCommandResponseUpdate

Member Function Documentation

◆ getDataForEngineDriveCommandResponseComponent()

virtual void physx::vehicle2::PxVehicleEngineDriveCommandResponseComponent::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 
)
pure virtual

Provide vehicle data items for this component.

Parameters
[out]axleDescriptionidentifies the wheels on each axle.
[out]brakeResponseParamsAn array of brake response parameters with a brake response for each brake command.
[out]steerResponseParamsThe steer response parameters.
[out]ackermannParamsThe parameters defining Ackermann steering. NULL if no Ackermann steering is desired.
[out]gearboxParamsThe gearbox parameters.
[out]clutchResponseParamsThe clutch response parameters.
[out]engineParamsThe engine parameters. Only needed if an autobox is provided (see autoboxParams), else it can be set to NULL.
[out]engineStateThe engine state. Only needed if an autobox is provided (see autoboxParams), else it can be set to NULL.
[out]autoboxParamsThe 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.
[out]rigidBodyStateThe state of the vehicle's rigid body.
[out]commandsThe throttle, brake, steer etc. command states.
[out]transmissionCommandsThe 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.
[out]brakeResponseStatesThe resulting brake response states given the command input and brake response parameters.
[out]throttleResponseStateThe resulting throttle response to the input throttle command.
[out]steerResponseStatesThe resulting steer response states given the command input, steer response and (optionally) Ackermann parameters.
[out]gearboxResponseStateThe resulting gearbox response state given the command input and gearbox parameters.
[out]clutchResponseStateThe resulting clutch state given the command input and clutch response parameters.
[out]autoboxStateThe 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.

Implemented in snippetvehicle2::EngineDriveVehicle.

◆ update()

virtual bool physx::vehicle2::PxVehicleEngineDriveCommandResponseComponent::update ( const PxReal  dt,
const PxVehicleSimulationContext &  context 
)
inlinevirtual

Update function for a vehicle component.

Parameters
[in]dtThe timestep size to use for the update step.
[in]contextVehicle simulation context holding global data or data that usually applies to a large group of vehicles.
Returns
True if subsequent components in a sequence should get updated, false if the sequence should be aborted.
See also
PxVehicleComponentSequence

Implements physx::vehicle2::PxVehicleComponent.


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