52 ioBody1.GetMotionProperties()->SubAngularVelocityStep(
inLambda * mInvI1_Axis);
54 ioBody2.GetMotionProperties()->AddAngularVelocityStep(
inLambda * mInvI2_Axis);
150 mEffectiveMass = 0.0f;
157 return mEffectiveMass != 0.0f;
252 float mEffectiveMass = 0.0f;
254 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
AllocateFunction Allocate
Definition Memory.cpp:59
@ FrequencyAndDamping
Frequency and damping are specified.
Definition AngleConstraintPart.h:37
bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, float inC, float inBaumgarte) const
Definition AngleConstraintPart.h:200
void CalculateConstraintPropertiesWithStiffnessAndDamping(float inDeltaTime, const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, float inStiffness, float inDamping)
Definition AngleConstraintPart.h:124
void Deactivate()
Deactivate this constraint.
Definition AngleConstraintPart.h:148
bool IsActive() const
Check if constraint is active.
Definition AngleConstraintPart.h:155
void CalculateConstraintProperties(const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias=0.0f)
Definition AngleConstraintPart.h:81
void RestoreState(StateRecorder &inStream)
Restore state of this constraint part.
Definition AngleConstraintPart.h:244
void WarmStart(Body &ioBody1, Body &ioBody2, float inWarmStartImpulseRatio)
Definition AngleConstraintPart.h:164
bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inWorldSpaceAxis, float inMinLambda, float inMaxLambda)
Definition AngleConstraintPart.h:176
void SaveState(StateRecorder &inStream) const
Save state of this constraint part.
Definition AngleConstraintPart.h:238
void CalculateConstraintPropertiesWithSettings(float inDeltaTime, const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, const SpringSettings &inSpringSettings)
Selects one of the above functions based on the spring settings.
Definition AngleConstraintPart.h:135
void CalculateConstraintPropertiesWithFrequencyAndDamping(float inDeltaTime, const Body &inBody1, const Body &inBody2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, float inFrequency, float inDamping)
Definition AngleConstraintPart.h:104
float GetTotalLambda() const
Return lagrange multiplier.
Definition AngleConstraintPart.h:190
Class used in other constraint parts to calculate the required bias factor in the lagrange multiplier...
Definition SpringPart.h:14
void CalculateSpringPropertiesWithFrequencyAndDamping(float inDeltaTime, float inInvEffectiveMass, float inBias, float inC, float inFrequency, float inDamping, float &outEffectiveMass)
Definition SpringPart.h:86
void CalculateSpringPropertiesWithStiffnessAndDamping(float inDeltaTime, float inInvEffectiveMass, float inBias, float inC, float inStiffness, float inDamping, float &outEffectiveMass)
Definition SpringPart.h:116
float GetBias(float inTotalLambda) const
Get total bias b, including supplied bias and bias for spring: lambda = J v + b.
Definition SpringPart.h:137
void CalculateSpringPropertiesWithBias(float inBias)
Definition SpringPart.h:71
bool IsActive() const
Returns if this spring is active.
Definition SpringPart.h:131
Settings for a linear or angular spring.
Definition SpringSettings.h:23
Definition StateRecorder.h:48
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition Vec3.inl:107