21#ifdef JPH_DEBUG_RENDERER 
   72    virtual 
void                SaveBinaryState(
StreamOut &inStream) const;
 
   85    uint                        mNumVelocityStepsOverride = 0;
 
   88    uint                        mNumPositionStepsOverride = 0;
 
   91    float                       mDrawConstraintSize = 1.0f;
 
   98    virtual 
void                RestoreBinaryState(
StreamIn &inStream);
 
  109#ifdef JPH_DEBUG_RENDERER
 
  110        mDrawConstraintSize(inSettings.mDrawConstraintSize),
 
  112        mConstraintPriority(inSettings.mConstraintPriority),
 
  113        mNumVelocityStepsOverride(
uint8(inSettings.mNumVelocityStepsOverride)),
 
  114        mNumPositionStepsOverride(
uint8(inSettings.mNumPositionStepsOverride)),
 
  115        mEnabled(inSettings.mEnabled),
 
  116        mUserData(inSettings.mUserData)
 
  184#ifdef JPH_DEBUG_RENDERER 
  208#ifdef JPH_DEBUG_RENDERER 
  217    static constexpr uint32     cInvalidConstraintIndex = 0xffffffff;
 
  220    uint32                      mConstraintIndex = cInvalidConstraintIndex;
 
  223    uint32                      mConstraintPriority = 0;
 
  226    uint8                       mNumVelocityStepsOverride = 0;
 
  229    uint8                       mNumPositionStepsOverride = 0;
 
  232    bool                        mEnabled = 
true;
 
EConstraintType
Enum to identify constraint type.
Definition: Constraint.h:27
 
EConstraintSpace
Certain constraints support setting them up in local or world space. This governs what is used.
Definition: Constraint.h:58
 
@ LocalToBodyCOM
All constraint properties are specified in local space to center of mass of the bodies that are being...
 
@ WorldSpace
All constraint properties are specified in world space.
 
EConstraintSubType
Enum to identify constraint sub type.
Definition: Constraint.h:34
 
@ User1
User defined constraint types start here.
 
std::uint8_t uint8
Definition: Core.h:453
 
#define JPH_EXPORT
Definition: Core.h:236
 
std::uint64_t uint64
Definition: Core.h:456
 
unsigned int uint
Definition: Core.h:452
 
#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_ASSERT(...)
Definition: IssueReporting.h:33
 
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition: Memory.h:31
 
#define JPH_DECLARE_SERIALIZABLE_VIRTUAL(linkage, class_name)
Definition: SerializableObject.h:109
 
ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition: BodyID.h:13
 
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
 
virtual ~Constraint()=default
Virtual destructor.
 
virtual void SetupVelocityConstraint(float inDeltaTime)=0
 
virtual bool IsActive() const
Definition: Constraint.h:171
 
virtual Ref< ConstraintSettings > GetConstraintSettings() const =0
Debug function to convert a constraint to its settings, note that this will not save to which bodies ...
 
bool GetEnabled() const
Test if a constraint is enabled.
Definition: Constraint.h:151
 
void SetUserData(uint64 inUserData)
Definition: Constraint.h:155
 
virtual bool SolveVelocityConstraint(float inDeltaTime)=0
 
virtual void NotifyShapeChanged(const BodyID &inBodyID, Vec3Arg inDeltaCOM)=0
 
void SetConstraintPriority(uint32 inPriority)
Definition: Constraint.h:134
 
void SetNumVelocityStepsOverride(uint inN)
Used only when the constraint is active. Override for the number of solver velocity iterations to run...
Definition: Constraint.h:137
 
uint64 GetUserData() const
Access to the user data, can be used for anything by the application.
Definition: Constraint.h:154
 
virtual void DrawConstraintLimits(DebugRenderer *inRenderer) const
Definition: Constraint.h:187
 
uint GetNumVelocityStepsOverride() const
Definition: Constraint.h:138
 
virtual EConstraintSubType GetSubType() const =0
Get the sub type of a constraint.
 
virtual uint BuildIslandSplits(LargeIslandSplitter &ioSplitter) const =0
Link bodies that are connected by this constraint in the same split. Returns the split index.
 
uint32 GetConstraintPriority() const
Definition: Constraint.h:133
 
virtual EConstraintType GetType() const
Get the type of a constraint.
Definition: Constraint.h:126
 
float GetDrawConstraintSize() const
Size of constraint when drawing it through the debug renderer.
Definition: Constraint.h:191
 
void SetNumPositionStepsOverride(uint inN)
Used only when the constraint is active. Override for the number of solver position iterations to run...
Definition: Constraint.h:141
 
virtual void DrawConstraintReferenceFrame(DebugRenderer *inRenderer) const
Definition: Constraint.h:188
 
void SetEnabled(bool inEnabled)
Definition: Constraint.h:148
 
virtual void WarmStartVelocityConstraint(float inWarmStartImpulseRatio)=0
 
virtual void DrawConstraint(DebugRenderer *inRenderer) const =0
 
uint GetNumPositionStepsOverride() const
Definition: Constraint.h:142
 
virtual bool SolvePositionConstraint(float inDeltaTime, float inBaumgarte)=0
 
JPH_OVERRIDE_NEW_DELETE Constraint(const ConstraintSettings &inSettings)
Constructor.
Definition: Constraint.h:108
 
void SetDrawConstraintSize(float inSize)
Definition: Constraint.h:192
 
float mDrawConstraintSize
Size of constraint when drawing it through the debug renderer.
Definition: Constraint.h:210
 
virtual void BuildIslands(uint32 inConstraintIndex, IslandBuilder &ioBuilder, BodyManager &inBodyManager)=0
Link bodies that are connected by this constraint in the island builder.
 
virtual void ResetWarmStart()=0
 
A constraint manager manages all constraints of the same type.
Definition: ConstraintManager.h:25
 
Class used to store the configuration of a constraint. Allows run-time creation of constraints.
Definition: Constraint.h:65
 
uint mNumPositionStepsOverride
Used only when the constraint is active. Override for the number of solver position iterations to run...
Definition: Constraint.h:88
 
uint mNumVelocityStepsOverride
Used only when the constraint is active. Override for the number of solver velocity iterations to run...
Definition: Constraint.h:85
 
Definition: DebugRenderer.h:47
 
Keeps track of connected bodies and builds islands for multithreaded velocity/position update.
Definition: IslandBuilder.h:19
 
Definition: LargeIslandSplitter.h:25
 
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition: NonCopyable.h:11
 
Definition: Reference.h:101
 
Definition: Reference.h:35
 
Helper class that either contains a valid result or an error.
Definition: Result.h:12
 
Definition: SerializableObject.h:156
 
Definition: StateRecorder.h:48
 
Simple binary input stream.
Definition: StreamIn.h:13
 
Simple binary output stream.
Definition: StreamOut.h:13