22 uint num_velocity_steps = inObject->GetNumVelocityStepsOverride();
23 mNumVelocitySteps = max(mNumVelocitySteps, num_velocity_steps);
24 mApplyDefaultVelocity |= num_velocity_steps == 0;
26 uint num_position_steps = inObject->GetNumPositionStepsOverride();
27 mNumPositionSteps = max(mNumPositionSteps, num_position_steps);
28 mApplyDefaultPosition |= num_position_steps == 0;
35 if (mApplyDefaultVelocity)
37 if (mApplyDefaultPosition)
48 uint mNumVelocitySteps = 0;
49 uint mNumPositionSteps = 0;
51 bool mApplyDefaultVelocity =
false;
52 bool mApplyDefaultPosition =
false;
unsigned int uint
Definition: Core.h:439
#define JPH_NAMESPACE_END
Definition: Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:361
Class used to calculate the total number of velocity and position steps.
Definition: CalculateSolverSteps.h:13
JPH_INLINE CalculateSolverSteps(const PhysicsSettings &inSettings)
Constructor.
Definition: CalculateSolverSteps.h:16
JPH_INLINE uint GetNumVelocitySteps() const
Definition: CalculateSolverSteps.h:43
JPH_INLINE void Finalize()
Must be called after all bodies/constraints have been processed.
Definition: CalculateSolverSteps.h:32
JPH_INLINE void operator()(const Type *inObject)
Combine the number of velocity and position steps for this body/constraint with the current values.
Definition: CalculateSolverSteps.h:20
JPH_INLINE uint GetNumPositionSteps() const
Get the results of the calculation.
Definition: CalculateSolverSteps.h:42
Dummy class to replace the steps calculator when we don't need the result.
Definition: CalculateSolverSteps.h:57
JPH_INLINE void operator()(const Type *) const
Definition: CalculateSolverSteps.h:60
Definition: PhysicsSettings.h:28
uint mNumPositionSteps
Number of solver position iterations to run.
Definition: PhysicsSettings.h:81
uint mNumVelocitySteps
Definition: PhysicsSettings.h:78