72 mp1->SubAngularVelocityStep(mInvI1_R1PlusUxN1 *
inLambda[0] + mInvI1_R1PlusUxN2 *
inLambda[1]);
119 mInvI1_R1PlusUxN1 =
inv_i1.Multiply3x3(mR1PlusUxN1);
120 mInvI1_R1PlusUxN2 =
inv_i1.Multiply3x3(mR1PlusUxN2);
139 mInvI2_R2xN1 =
inv_i2.Multiply3x3(mR2xN1);
140 mInvI2_R2xN2 =
inv_i2.Multiply3x3(mR2xN2);
167 return !mEffectiveMass.
IsZero();
268 Vec3 mInvI1_R1PlusUxN1;
269 Vec3 mInvI1_R1PlusUxN2;
272 Mat22 mEffectiveMass;
#define JPH_IF_DEBUG(...)
Definition Core.h:486
#define JPH_NAMESPACE_END
Definition Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
AllocateFunction Allocate
Definition Memory.cpp:59
Definition DualAxisConstraintPart.h:48
bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2)
Definition DualAxisConstraintPart.h:180
void RestoreState(StateRecorder &inStream)
Restore state of this constraint part.
Definition DualAxisConstraintPart.h:258
Matrix< 2, 2 > Mat22
Definition DualAxisConstraintPart.h:51
void WarmStart(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inWarmStartImpulseRatio)
Definition DualAxisConstraintPart.h:172
bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inU, Vec3Arg inN1, Vec3Arg inN2, float inBaumgarte) const
Definition DualAxisConstraintPart.h:193
Vector< 2 > Vec2
Definition DualAxisConstraintPart.h:50
void SaveState(StateRecorder &inStream) const
Save state of this constraint part.
Definition DualAxisConstraintPart.h:252
const Vec2 & GetTotalLambda() const
Return lagrange multiplier.
Definition DualAxisConstraintPart.h:246
void SetTotalLambda(const Vec2 &inLambda)
Override total lagrange multiplier, can be used to set the initial value for warm starting.
Definition DualAxisConstraintPart.h:240
bool IsActive() const
Check if constraint is active.
Definition DualAxisConstraintPart.h:165
void Deactivate()
Deactivate this constraint.
Definition DualAxisConstraintPart.h:158
void CalculateConstraintProperties(const Body &inBody1, Mat44Arg inRotation1, Vec3Arg inR1PlusU, const Body &inBody2, Mat44Arg inRotation2, Vec3Arg inR2, Vec3Arg inN1, Vec3Arg inN2)
Definition DualAxisConstraintPart.h:102
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
static Matrix sZero()
Definition Matrix.h:32
bool SetInversed(const Matrix &inM)
Inverse matrix.
Definition Matrix.h:200
void SetZero()
Zero matrix.
Definition Matrix.h:26
bool IsZero() const
Check if this matrix consists of all zeros.
Definition Matrix.h:35
The Body class only keeps track of state for static bodies, the MotionProperties class keeps the addi...
Definition MotionProperties.h:29
void AddLinearVelocityStep(Vec3Arg inLinearVelocityChange)
Definition MotionProperties.h:191
void SubLinearVelocityStep(Vec3Arg inLinearVelocityChange)
Definition MotionProperties.h:192
Definition StateRecorder.h:48
JPH_INLINE float Dot(Vec3Arg inV2) const
Dot product.
Definition Vec3.inl:637
JPH_INLINE Vec3 Cross(Vec3Arg inV2) const
Cross product.
Definition Vec3.inl:582
static JPH_INLINE Vec3 sNaN()
Vector with all NaN's.
Definition Vec3.inl:129
void SetZero()
Vector with all zeros.
Definition Vector.h:22
float Dot(const Vector &inV2) const
Dot product.
Definition Vector.h:171
static Vector sZero()
Definition Vector.h:28