17JPH_SUPPRESS_WARNING_PUSH
 
   31JPH_SUPPRESS_WARNING_POP
 
   62    float                           mPathFraction = 0.0f;
 
   65    float                           mMaxFrictionForce = 0.0f;
 
 
   89    virtual void                    NotifyShapeChanged(
const BodyID &inBodyID, 
Vec3Arg inDeltaCOM) 
override;
 
   90    virtual void                    SetupVelocityConstraint(
float inDeltaTime) 
override;
 
   91    virtual void                    ResetWarmStart() 
override;
 
   92    virtual void                    WarmStartVelocityConstraint(
float inWarmStartImpulseRatio) 
override;
 
   93    virtual bool                    SolveVelocityConstraint(
float inDeltaTime) 
override;
 
   94    virtual bool                    SolvePositionConstraint(
float inDeltaTime, 
float inBaumgarte) 
override;
 
   95#ifdef JPH_DEBUG_RENDERER 
   96    virtual void                    DrawConstraint(
DebugRenderer *inRenderer) 
const override;
 
   98    virtual void                    SaveState(
StateRecorder &inStream) 
const override;
 
  129    void                            SetTargetPathFraction(
float inFraction)                 { 
JPH_ASSERT(mPath->IsLooping() || (inFraction >= 0.0f && inFraction <= mPath->GetPathMaxFraction())); mTargetPathFraction = inFraction; }
 
  141    void                            CalculateConstraintProperties(
float inDeltaTime);
 
  151    float                           mMaxFrictionForce;
 
  156    float                           mTargetVelocity = 0.0f;
 
  157    float                           mTargetPathFraction = 0.0f;
 
  176    Quat                            mInvInitialOrientation;
 
  179    float                           mPathFraction = 0.0f;
 
 
EConstraintSubType
Enum to identify constraint sub type.
Definition Constraint.h:34
 
#define JPH_EXPORT
Definition Core.h:275
 
#define JPH_GCC_SUPPRESS_WARNING(w)
Definition Core.h:312
 
#define JPH_NAMESPACE_END
Definition Core.h:419
 
#define JPH_NAMESPACE_BEGIN
Definition Core.h:413
 
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
 
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:43
 
EMotorState
Definition MotorSettings.h:17
 
EPathRotationConstraintType
How to constrain the rotation of the body to a PathConstraint.
Definition PathConstraint.h:22
 
@ ConstrainToPath
Fully constrain the rotation of body 2 to the path (following the tangent and normal of the path)
 
@ FullyConstrained
Fully constrain the rotation of the body 2 to the rotation of body 1.
 
@ Free
Do not constrain the rotation of the body at all.
 
@ ConstrainAroundNormal
Only allow rotation around the normal vector (perpendicular to the path)
 
@ ConstrainAroundBinormal
Only allow rotation around the binormal vector (perpendicular to the path)
 
@ ConstrainAroundTangent
Only allow rotation around the tangent vector (following the path)
 
#define JPH_DECLARE_SERIALIZABLE_VIRTUAL(linkage, class_name)
Definition SerializableObject.h:109
 
Definition AxisConstraintPart.h:43
 
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
 
Definition DualAxisConstraintPart.h:48
 
Definition HingeRotationConstraintPart.h:44
 
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
 
Definition MotorSettings.h:26
 
Path constraint, used to constrain the degrees of freedom between two bodies to a path.
Definition PathConstraint.h:80
 
float GetMaxFrictionForce() const
Definition PathConstraint.h:118
 
void SetTargetVelocity(float inVelocity)
Definition PathConstraint.h:127
 
void SetTargetPathFraction(float inFraction)
Definition PathConstraint.h:129
 
EMotorState GetPositionMotorState() const
Definition PathConstraint.h:126
 
float GetTargetPathFraction() const
Definition PathConstraint.h:130
 
virtual bool IsActive() const override
Solver interface.
Definition PathConstraint.h:100
 
void SetPositionMotorState(EMotorState inState)
Definition PathConstraint.h:125
 
virtual EConstraintSubType GetSubType() const override
Get the sub type of a constraint.
Definition PathConstraint.h:88
 
Vec3 GetTotalLambdaRotation() const
Definition PathConstraint.h:137
 
virtual Mat44 GetConstraintToBody1Matrix() const override
Calculates the transform that transforms from constraint space to body 1 space. The first column of t...
Definition PathConstraint.h:104
 
float GetTargetVelocity() const
Definition PathConstraint.h:128
 
Vector< 2 > GetTotalLambdaPosition() const
Definition PathConstraint.h:133
 
MotorSettings & GetPositionMotorSettings()
Position motor settings.
Definition PathConstraint.h:121
 
const PathConstraintPath * GetPath() const
Access to the current path.
Definition PathConstraint.h:111
 
Vector< 2 > GetTotalLambdaRotationHinge() const
Definition PathConstraint.h:136
 
void SetMaxFrictionForce(float inFrictionForce)
Friction control.
Definition PathConstraint.h:117
 
float GetTotalLambdaMotor() const
Definition PathConstraint.h:135
 
virtual Mat44 GetConstraintToBody2Matrix() const override
Calculates the transform that transforms from constraint space to body 2 space. The first column of t...
Definition PathConstraint.h:105
 
float GetPathFraction() const
Access to the current fraction along the path e [0, GetPath()->GetMaxPathFraction()].
Definition PathConstraint.h:114
 
const MotorSettings & GetPositionMotorSettings() const
Definition PathConstraint.h:122
 
float GetTotalLambdaPositionLimits() const
Definition PathConstraint.h:134
 
The path for a path constraint. It allows attaching two bodies to each other while giving the second ...
Definition PathConstraintPath.h:21
 
Definition PathConstraint.h:42
 
RefConst< PathConstraintPath > mPath
The path that constrains the two bodies.
Definition PathConstraint.h:53
 
MotorSettings mPositionMotorSettings
In case the constraint is powered, this determines the motor settings along the path.
Definition PathConstraint.h:68
 
static JPH_INLINE Quat sIdentity()
Definition Quat.h:104
 
Definition Reference.h:163
 
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
 
virtual bool IsActive() const override
Solver interface.
Definition TwoBodyConstraint.h:38
 
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 sZero()
Vector with all zeros.
Definition Vec3.inl:103
 
Templatized vector class.
Definition Vector.h:12