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

Work items at the end of an update step for a PhysX actor based vehicle. More...

#include <PxVehiclePhysXActorComponents.h>

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

Public Member Functions

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)=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

Work items at the end of an update step for a PhysX actor based vehicle.

Includes:

  • Writing vehicle internal state to the PhysX actor.
  • Keeping the vehicle awake if certain criteria are met.

Member Function Documentation

◆ getDataForPhysXActorEndComponent()

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

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.

Implemented in snippetvehicle2::EngineDriveVehicle, and snippetvehicle2::PhysXActorVehicle.

◆ update()

virtual bool physx::vehicle2::PxVehiclePhysXActorEndComponent::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: