54 ioBody1.GetMotionProperties()->AddAngularVelocityStep(
inLambda * mInvI1_A);
55 ioBody2.GetMotionProperties()->SubLinearVelocityStep(
inLambda * mRatio_InvM2_B);
78 float inv_m2 =
inBody2.GetMotionProperties()->GetInverseMass();
92 mEffectiveMass = 0.0f;
99 return mEffectiveMass != 0.0f;
192 float mEffectiveMass = 0.0f;
193 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 Square(T inV)
Square a value.
Definition Math.h:52
AllocateFunction Allocate
Definition Memory.cpp:59
Definition RackAndPinionConstraintPart.h:40
void CalculateConstraintProperties(const Body &inBody1, Vec3Arg inWorldSpaceHingeAxis, const Body &inBody2, Vec3Arg inWorldSpaceSliderAxis, float inRatio)
Definition RackAndPinionConstraintPart.h:69
bool SolveVelocityConstraint(Body &ioBody1, Vec3Arg inWorldSpaceHingeAxis, Body &ioBody2, Vec3Arg inWorldSpaceSliderAxis, float inRatio)
Definition RackAndPinionConstraintPart.h:118
float GetTotalLambda() const
Return lagrange multiplier.
Definition RackAndPinionConstraintPart.h:130
void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio)
Definition RackAndPinionConstraintPart.h:106
void SaveState(StateRecorder &inStream) const
Save state of this constraint part.
Definition RackAndPinionConstraintPart.h:178
bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inC, float inBaumgarte) const
Definition RackAndPinionConstraintPart.h:140
void RestoreState(StateRecorder &inStream)
Restore state of this constraint part.
Definition RackAndPinionConstraintPart.h:184
void Deactivate()
Deactivate this constraint.
Definition RackAndPinionConstraintPart.h:90
bool IsActive() const
Check if constraint is active.
Definition RackAndPinionConstraintPart.h:97
Definition StateRecorder.h:48