31#include "vehicle2/PxVehicleAPI.h"
32#include "../physxintegration/PhysXIntegration.h"
34namespace snippetvehicle2
38using namespace physx::vehicle2;
49 if (!directDriveThrottleResponseParams.isValid(axleDesc))
58 PxReal directDriveThrottleResponseStates[PxVehicleLimits::eMAX_NB_WHEELS];
81 virtual void destroy();
83 virtual void initComponentSequence(
bool addPhysXBeginEndComponents);
96 axleDescription = &mBaseParams.axleDescription;
98 throttleResponseParams = &mDirectDriveParams.directDriveThrottleResponseParams;
99 steerResponseParams = &mBaseParams.steerResponseParams;
101 commands = &mCommandState;
102 transmissionCommands = &mTransmissionCommandState;
103 rigidBodyState = &mBaseState.rigidBodyState;
104 brakeResponseStates.
setData(mBaseState.brakeCommandResponseStates);
105 throttleResponseStates.
setData(mDirectDriveState.directDriveThrottleResponseStates);
106 steerResponseStates.
setData(mBaseState.steerCommandResponseStates);
115 axleDescription = &mBaseParams.axleDescription;
116 brakeResponseStates.
setData(mBaseState.brakeCommandResponseStates);
117 throttleResponseStates.
setData(mDirectDriveState.directDriveThrottleResponseStates);
118 actuationStates.
setData(mBaseState.actuationStates);
121 virtual void getDataForDirectDrivetrainComponent(
130 axleDescription = &mBaseParams.axleDescription;
131 brakeResponseStates.
setData(mBaseState.brakeCommandResponseStates);
132 throttleResponseStates.
setData(mDirectDriveState.directDriveThrottleResponseStates);
133 wheelParams.
setData(mBaseParams.wheelParams);
134 actuationStates.
setData(mBaseState.actuationStates);
135 tireForces.
setData(mBaseState.tireForces);
136 wheelRigidBody1dStates.
setData(mBaseState.wheelRigidBody1dStates);
141 DirectDrivetrainParams mDirectDriveParams;
142 DirectDrivetrainState mDirectDriveState;
Material class to represent a set of surface properties.
Definition PxMaterial.h:149
Abstract singleton factory class used for instancing objects in the Physics SDK.
Definition PxPhysics.h:91
Determine the actuation state for each wheel of a direct drive vehicle.
Definition PxVehicleDrivetrainComponents.h:177
Forward the applicable set of control values for a direct drive vehicle to a command response state f...
Definition PxVehicleDrivetrainComponents.h:75
Forward integrate the angular speed of each wheel on a vehicle by integrating the brake and drive tor...
Definition PxVehicleDrivetrainComponents.h:237
Definition DirectDrivetrain.h:78
void getDataForDirectDriveCommandResponseComponent(const PxVehicleAxleDescription *&axleDescription, PxVehicleSizedArrayData< const PxVehicleBrakeCommandResponseParams > &brakeResponseParams, const PxVehicleDirectDriveThrottleCommandResponseParams *&throttleResponseParams, const PxVehicleSteerCommandResponseParams *&steerResponseParams, PxVehicleSizedArrayData< const PxVehicleAckermannParams > &ackermannParams, const PxVehicleCommandState *&commands, const PxVehicleDirectDriveTransmissionCommandState *&transmissionCommands, const PxVehicleRigidBodyState *&rigidBodyState, PxVehicleArrayData< PxReal > &brakeResponseStates, PxVehicleArrayData< PxReal > &throttleResponseStates, PxVehicleArrayData< PxReal > &steerResponseStates)
Provide vehicle data items for this component.
Definition DirectDrivetrain.h:85
virtual void getDataForDirectDriveActuationStateComponent(const PxVehicleAxleDescription *&axleDescription, PxVehicleArrayData< const PxReal > &brakeResponseStates, PxVehicleArrayData< const PxReal > &throttleResponseStates, PxVehicleArrayData< PxVehicleWheelActuationState > &actuationStates)
Provide vehicle data items for this component.
Definition DirectDrivetrain.h:109
Definition PhysXIntegration.h:116
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_FORCE_INLINE void * PxMemZero(void *dest, PxU32 count)
Sets the bytes of the provided buffer to zero.
Definition PxMemory.h:53
Structure describing parameters affecting mesh cooking.
Definition PxCooking.h:185
A description of a single axle that is to be affected by Ackermann steer correction.
Definition PxVehicleSteeringParams.h:86
Helper struct to pass array type data to vehice components and functions.
Definition PxVehicleParams.h:249
PX_FORCE_INLINE void setData(T *data)
Set the data as an array of structs.
Definition PxVehicleParams.h:261
Definition PxVehicleParams.h:53
Distribute a brake response to the wheels of a vehicle.
Definition PxVehicleBrakingParams.h:56
A description of the state of commands that are applied to the vehicle.
Definition PxVehicleCommandStates.h:53
Distribute a throttle response to the wheels of a direct drive vehicle.
Definition PxVehicleDrivetrainParams.h:57
A description of the state of transmission-related commands that are applied to a vehicle with direct...
Definition PxVehicleCommandStates.h:69
Definition PxVehicleParams.h:174
Definition PxVehicleRigidBodyStates.h:47
Definition PxVehicleParams.h:224
Definition PxVehicleParams.h:369
PX_FORCE_INLINE void setDataAndCount(T *data, const PxU32 count)
Set the data as an array of structs and set the number of data entries.
Definition PxVehicleParams.h:376
Distribute a steer response to the wheels of a vehicle.
Definition PxVehicleSteeringParams.h:58
Definition DirectDrivetrain.h:41
Definition DirectDrivetrain.h:57