58 virtual void NotifyShapeChanged(
const BodyID &inBodyID,
Vec3Arg inDeltaCOM)
override;
59 virtual void SetupVelocityConstraint(
float inDeltaTime)
override;
60 virtual void ResetWarmStart()
override;
61 virtual void WarmStartVelocityConstraint(
float inWarmStartImpulseRatio)
override;
62 virtual bool SolveVelocityConstraint(
float inDeltaTime)
override;
63 virtual bool SolvePositionConstraint(
float inDeltaTime,
float inBaumgarte)
override;
64#ifdef JPH_DEBUG_RENDERER
65 virtual void DrawConstraint(
DebugRenderer *inRenderer)
const override;
67 virtual void SaveState(
StateRecorder &inStream)
const override;
83 Vec3 mLocalSpacePosition1;
84 Vec3 mLocalSpacePosition2;
87 Quat mInvInitialOrientation;
EConstraintSpace
Certain constraints support setting them up in local or world space. This governs what is used.
Definition Constraint.h:58
@ WorldSpace
All constraint properties are specified in world space.
Definition Constraint.h:60
EConstraintSubType
Enum to identify constraint sub type.
Definition Constraint.h:34
@ Fixed
Definition Constraint.h:35
#define JPH_EXPORT
Definition Core.h:275
#define JPH_NAMESPACE_END
Definition Core.h:425
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
const Vec3 Vec3Arg
Definition MathTypes.h:19
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:50
Vec3 RVec3
Definition Real.h:29
#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
virtual void SaveBinaryState(StreamOut &inStream) const
Saves the contents of the constraint settings in binary form to inStream.
Definition Constraint.cpp:26
virtual void RestoreBinaryState(StreamIn &inStream)
This function should not be called directly, it is used by sRestoreFromBinaryState.
Definition Constraint.cpp:36
Definition DebugRenderer.h:47
Vec3 GetTotalLambdaPosition() const
Definition FixedConstraint.h:76
Vec3 GetTotalLambdaRotation() const
Definition FixedConstraint.h:77
JPH_OVERRIDE_NEW_DELETE FixedConstraint(Body &inBody1, Body &inBody2, const FixedConstraintSettings &inSettings)
Constructor.
Definition FixedConstraint.cpp:65
virtual Mat44 GetConstraintToBody2Matrix() const override
Calculates the transform that transforms from constraint space to body 2 space. The first column of t...
Definition FixedConstraint.h:73
virtual Mat44 GetConstraintToBody1Matrix() const override
Calculates the transform that transforms from constraint space to body 1 space. The first column of t...
Definition FixedConstraint.h:72
virtual EConstraintSubType GetSubType() const override
Get the sub type of a constraint.
Definition FixedConstraint.h:57
Fixed constraint settings, used to create a fixed constraint.
Definition FixedConstraint.h:15
bool mAutoDetectPoint
When mSpace is WorldSpace mPoint1 and mPoint2 can be automatically calculated based on the positions ...
Definition FixedConstraint.h:29
RVec3 mPoint1
Body 1 constraint reference frame (space determined by mSpace).
Definition FixedConstraint.h:32
Vec3 mAxisY2
Definition FixedConstraint.h:39
Vec3 mAxisX2
Definition FixedConstraint.h:38
RVec3 mPoint2
Body 2 constraint reference frame (space determined by mSpace).
Definition FixedConstraint.h:37
EConstraintSpace mSpace
This determines in which space the constraint is setup, all properties below should be in the specifi...
Definition FixedConstraint.h:26
Vec3 mAxisY1
Definition FixedConstraint.h:34
Vec3 mAxisX1
Definition FixedConstraint.h:33
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
static JPH_INLINE Mat44 sTranslation(Vec3Arg inV)
Get matrix that translates.
Definition Mat44.inl:144
static JPH_INLINE Mat44 sRotationTranslation(QuatArg inR, Vec3Arg inT)
Get matrix that rotates and translates.
Definition Mat44.inl:149
Definition PointConstraintPart.h:41
Definition Reference.h:107
Definition RotationEulerConstraintPart.h:36
Definition StateRecorder.h:110
Simple binary input stream.
Definition StreamIn.h:13
Simple binary output stream.
Definition StreamOut.h:13
Base class for all constraints that involve 2 bodies. Body1 is usually considered the parent,...
Definition TwoBodyConstraint.h:27
JPH_OVERRIDE_NEW_DELETE TwoBodyConstraint(Body &inBody1, Body &inBody2, const TwoBodyConstraintSettings &inSettings)
Constructor.
Definition TwoBodyConstraint.h:32
Base class for settings for all constraints that involve 2 bodies.
Definition TwoBodyConstraint.h:16
virtual TwoBodyConstraint * Create(Body &inBody1, Body &inBody2) const =0
static JPH_INLINE Vec3 sAxisX()
Vectors with the principal axis.
Definition Vec3.h:56
static JPH_INLINE Vec3 sAxisY()
Definition Vec3.h:57
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition Vec3.inl:103