16#ifdef JPH_DEBUG_RENDERER
29#ifdef JPH_ENABLE_ASSERTS
36 void Add(
Constraint **inConstraints,
int inNumber);
40 void Remove(
Constraint **inConstraint,
int inNumber);
49 void GetActiveConstraints(
uint32 inStartConstraintIdx,
uint32 inEndConstraintIdx,
Constraint **outActiveConstraints,
uint32 &outNumActiveConstraints)
const;
55 static void sSortConstraints(
Constraint **inActiveConstraints,
uint32 *inConstraintIdxBegin,
uint32 *inConstraintIdxEnd);
58 static void sSetupVelocityConstraints(
Constraint **inActiveConstraints,
uint32 inNumActiveConstraints,
float inDeltaTime);
61 template <
class Constra
intCallback>
62 static void sWarmStartVelocityConstraints(
Constraint **inActiveConstraints,
const uint32 *inConstraintIdxBegin,
const uint32 *inConstraintIdxEnd,
float inWarmStartImpulseRatio, ConstraintCallback &ioCallback);
65 static bool sSolveVelocityConstraints(
Constraint **inActiveConstraints,
const uint32 *inConstraintIdxBegin,
const uint32 *inConstraintIdxEnd,
float inDeltaTime);
68 static bool sSolvePositionConstraints(
Constraint **inActiveConstraints,
const uint32 *inConstraintIdxBegin,
const uint32 *inConstraintIdxEnd,
float inDeltaTime,
float inBaumgarte);
70#ifdef JPH_DEBUG_RENDERER
78 void DrawConstraintReferenceFrame(
DebugRenderer *inRenderer)
const;
92#ifdef JPH_ENABLE_ASSERTS
93 PhysicsLockContext mLockContext;
96 mutable Mutex mConstraintsMutex;
#define JPH_EXPORT
Definition: Core.h:236
#define JPH_NAMESPACE_END
Definition: Core.h:378
std::uint32_t uint32
Definition: Core.h:455
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
#define JPH_IF_ENABLE_ASSERTS(...)
Definition: IssueReporting.h:35
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition: Memory.h:31
Class that contains all bodies.
Definition: BodyManager.h:44
Base class for all physics constraints. A constraint removes one or more degrees of freedom for a rig...
Definition: Constraint.h:103
A constraint manager manages all constraints of the same type.
Definition: ConstraintManager.h:25
uint32 GetNumConstraints() const
Get total number of constraints.
Definition: ConstraintManager.h:46
void LockAllConstraints()
Lock all constraints. This should only be done during PhysicsSystem::Update().
Definition: ConstraintManager.h:88
void UnlockAllConstraints()
Definition: ConstraintManager.h:89
Definition: DebugRenderer.h:47
Keeps track of connected bodies and builds islands for multithreaded velocity/position update.
Definition: IslandBuilder.h:19
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition: NonCopyable.h:11
static void sUnlock(LockType &inMutex JPH_IF_ENABLE_ASSERTS(, PhysicsLockContext inContext, EPhysicsLockTypes inType))
Definition: PhysicsLock.h:61
static void sLock(LockType &inMutex JPH_IF_ENABLE_ASSERTS(, PhysicsLockContext inContext, EPhysicsLockTypes inType))
Definition: PhysicsLock.h:54
User callbacks that allow determining which parts of the simulation should be saved by a StateRecorde...
Definition: StateRecorder.h:29
Definition: StateRecorder.h:48