66 mp1->AddAngularVelocityStep(mInvI1_R1xN1 *
inLambda);
72 mp2->AddAngularVelocityStep(mInvI2_RatioR2xN2 *
inLambda);
100 mInvI1_R1xN1 =
mp1->MultiplyWorldSpaceInverseInertiaByVector(
inBody1.GetRotation(), mR1xN1);
110 mInvI2_RatioR2xN2 =
mp2->MultiplyWorldSpaceInverseInertiaByVector(
inBody2.GetRotation(), mRatioR2xN2);
125 mEffectiveMass = 0.0f;
132 return mEffectiveMass != 0.0f;
241 Vec3 mInvI2_RatioR2xN2;
242 float mEffectiveMass = 0.0f;
243 float mTotalLambda = 0.0f;
#define JPH_NAMESPACE_END
Definition Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
constexpr T Clamp(T inV, T inMin, T inMax)
Clamp a value between two values.
Definition Math.h:45
constexpr T Square(T inV)
Square a value.
Definition Math.h:52
AllocateFunction Allocate
Definition Memory.cpp:59
Definition IndependentAxisConstraintPart.h:48
void CalculateConstraintProperties(const Body &inBody1, const Body &inBody2, Vec3Arg inR1, Vec3Arg inN1, Vec3Arg inR2, Vec3Arg inN2, float inRatio)
Definition IndependentAxisConstraintPart.h:89
float GetTotalLambda() const
Return lagrange multiplier.
Definition IndependentAxisConstraintPart.h:170
void RestoreState(StateRecorder &inStream)
Restore state of this constraint part.
Definition IndependentAxisConstraintPart.h:232
bool IsActive() const
Check if constraint is active.
Definition IndependentAxisConstraintPart.h:130
void WarmStart(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inWarmStartImpulseRatio)
Definition IndependentAxisConstraintPart.h:142
bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inMinLambda, float inMaxLambda)
Definition IndependentAxisConstraintPart.h:156
void Deactivate()
Deactivate this constraint.
Definition IndependentAxisConstraintPart.h:123
bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inN1, Vec3Arg inN2, float inRatio, float inC, float inBaumgarte) const
Definition IndependentAxisConstraintPart.h:183
void SaveState(StateRecorder &inStream) const
Save state of this constraint part.
Definition IndependentAxisConstraintPart.h:226
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
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