PxVehicleComponentSequence
Defined in include/vehicle2/PxVehicleComponentSequence.h
-
struct PxVehicleComponentSequence
-
Public Functions
-
inline PxVehicleComponentSequence()
-
inline bool add(PxVehicleComponent *component)
Add a component to the sequence.
- Parameters
component – [in] The component to add to the sequence.
- Returns
True on success, else false (for example due to component count limit being reached).
-
inline PxU8 beginSubstepGroup(const PxU8 nbSubSteps = 1)
Start a substepping group.
See also
See also
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().
Note
Groups can be nested with stacked calls to beginSubstepGroup().
Note
Each group opened by beginSubstepGroup() must be closed with a complementary endSubstepGroup() prior to calling update().
- Parameters
nbSubSteps – [in] is 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
-
inline void endSubstepGroup()
End a substepping group.
See also
See also
Note
The group most recently opened with beginSubstepGroup() will be closed by this call.
-
inline void setSubsteps(const PxU8 subGroupHandle, const PxU8 nbSteps)
Set the number of substeps to perform for a specific substepping group.
See also
See also
- Parameters
subGroupHandle – [in] specifies the substepping group
nbSteps – [in] is the number of times to invoke the sequence of components and groups in the specified substepping group.
-
inline void update(const PxReal dt, const PxVehicleSimulationContext &context)
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
dt – [in] is the timestep of the update. The provided value has to be positive.
context – [in] specifies global quantities of the simulation such as gravitational acceleration.
-
inline PxVehicleComponentSequence()