RavEngine
Loading...
Searching...
No Matches
physx::vehicle2::PxVehicleComponentSequence Struct Reference

Public Types

enum  { eINVALID_SUBSTEP_GROUP = 0xff }
 

Public Member Functions

PX_FORCE_INLINE bool add (PxVehicleComponent *component)
 Add a component to the sequence.
 
PX_FORCE_INLINE PxU8 beginSubstepGroup (const PxU8 nbSubSteps=1)
 Start a substepping group.
 
PX_FORCE_INLINE void endSubstepGroup ()
 End a substepping group.
 
void setSubsteps (const PxU8 subGroupHandle, const PxU8 nbSteps)
 Set the number of substeps to perform for a specific substepping group.
 
void update (const PxReal dt, const PxVehicleSimulationContext &context)
 Update each component in the sequence.
 

Member Function Documentation

◆ add()

bool physx::vehicle2::PxVehicleComponentSequence::add ( PxVehicleComponent *  component)

Add a component to the sequence.

Parameters
[in]componentThe component to add to the sequence.
Returns
True on success, else false (for example due to component count limit being reached).

◆ beginSubstepGroup()

PxU8 physx::vehicle2::PxVehicleComponentSequence::beginSubstepGroup ( const PxU8  nbSubSteps = 1)

Start a substepping group.

Note
All components added using add() will be added to the new substepping group until either the group is marked as complete with a call to endSubstepGroup() or a subsequent substepping group is started with a call to beginSubstepGroup().
Groups can be nested with stacked calls to beginSubstepGroup().
Each group opened by beginSubstepGroup() must be closed with a complementary endSubstepGroup() prior to calling update().
Parameters
[in]nbSubStepsis the number of substeps for the group's sequence. This can be changed with a call to setSubsteps().
Returns
Handle for the substepping group on success, else eINVALID_SUBSTEP_GROUP
See also
setSubsteps()
endSubstepGroup()

◆ endSubstepGroup()

PX_FORCE_INLINE void physx::vehicle2::PxVehicleComponentSequence::endSubstepGroup ( )
inline

End a substepping group.

Note
The group most recently opened with beginSubstepGroup() will be closed by this call.
See also
setSubsteps()
beginSubstepGroup()

◆ setSubsteps()

void physx::vehicle2::PxVehicleComponentSequence::setSubsteps ( const PxU8  subGroupHandle,
const PxU8  nbSteps 
)
inline

Set the number of substeps to perform for a specific substepping group.

Parameters
[in]subGroupHandlespecifies the substepping group
[in]nbStepsis the number of times to invoke the sequence of components and groups in the specified substepping group.
See also
beginSubstepGroup()
endSubstepGroup()

◆ update()

void physx::vehicle2::PxVehicleComponentSequence::update ( const PxReal  dt,
const PxVehicleSimulationContext &  context 
)
inline

Update each component in the sequence.

Note
If the update method of a component in the sequence returns false, the update process gets aborted.
Parameters
[in]dtis the timestep of the update. The provided value has to be positive.
[in]contextspecifies global quantities of the simulation such as gravitational acceleration.

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