89 if (
perp.LengthSq() < 1.0e-6f)
96 a2 = (0.99f *
perp.Normalized() + 0.01f * mA1).Normalized();
104 mB2xA1 = mB2.
Cross(mA1);
105 mC2xA1 = mC2.
Cross(mA1);
218 Mat22 mEffectiveMass;
#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 HingeRotationConstraintPart.h:44
bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inBaumgarte) const
Iteratively update the position constraint. Makes sure C(...) = 0.
Definition HingeRotationConstraintPart.h:151
void CalculateConstraintProperties(const Body &inBody1, Mat44Arg inRotation1, Vec3Arg inWorldSpaceHingeAxis1, const Body &inBody2, Mat44Arg inRotation2, Vec3Arg inWorldSpaceHingeAxis2)
Calculate properties used during the functions below.
Definition HingeRotationConstraintPart.h:76
void Deactivate()
Deactivate this constraint.
Definition HingeRotationConstraintPart.h:119
void SaveState(StateRecorder &inStream) const
Save state of this constraint part.
Definition HingeRotationConstraintPart.h:199
void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio)
Must be called from the WarmStartVelocityConstraint call to apply the previous frame's impulses.
Definition HingeRotationConstraintPart.h:126
const Vec2 & GetTotalLambda() const
Return lagrange multiplier.
Definition HingeRotationConstraintPart.h:193
bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2)
Iteratively update the velocity constraint. Makes sure d/dt C(...) = 0, where C is the constraint equ...
Definition HingeRotationConstraintPart.h:133
Matrix< 2, 2 > Mat22
Definition HingeRotationConstraintPart.h:47
void RestoreState(StateRecorder &inStream)
Restore state of this constraint part.
Definition HingeRotationConstraintPart.h:205
Vector< 2 > Vec2
Definition HingeRotationConstraintPart.h:46
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 sZero()
Zero matrix.
Definition Mat44.inl:30
JPH_INLINE Vec3 Multiply3x3(Vec3Arg inV) const
Multiply vector by only 3x3 part of the matrix.
Definition Mat44.inl:316
bool SetInversed(const Matrix &inM)
Inverse matrix.
Definition Matrix.h:200
void SetZero()
Zero matrix.
Definition Matrix.h:26
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
JPH_INLINE Vec3 GetNormalizedPerpendicular() const
Get normalized vector that is perpendicular to this vector.
Definition Vec3.inl:812
void SetZero()
Vector with all zeros.
Definition Vector.h:22
static Vector sZero()
Definition Vector.h:28