Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ContactConstraintPart< Type1, Type2 > Class Template Reference

#include <ContactConstraintPart.h>

Inheritance diagram for ContactConstraintPart< Type1, Type2 >:
ContactConstraintPart1< Type1 > ContactConstraintPart2< Type2 >

Public Member Functions

JPH_INLINE void CalculateConstraintProperties (float inInvMass1, Mat44Arg inInvI1, Vec3Arg inR1PlusU, float inInvMass2, Mat44Arg inInvI2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias=0.0f)
 See AxisConstraintPart::CalculateConstraintProperties.
 
void WarmStart (MotionProperties *ioMotionProperties1, float inInvMass1, MotionProperties *ioMotionProperties2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inWarmStartImpulseRatio)
 See AxisConstraintPart::WarmStart.
 
JPH_INLINE float SolveVelocityConstraintGetTotalLambda (const MotionProperties *ioMotionProperties1, const MotionProperties *ioMotionProperties2, Vec3Arg inWorldSpaceAxis) const
 Part 1 of AxisConstraint::SolveVelocityConstraint: get the total lambda.
 
JPH_INLINE bool SolveVelocityConstraintApplyLambda (MotionProperties *ioMotionProperties1, float inInvMass1, MotionProperties *ioMotionProperties2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inTotalLambda)
 Part 2 of AxisConstraint::SolveVelocityConstraint: apply new lambda.
 
JPH_INLINE bool SolveVelocityConstraint (MotionProperties *ioMotionProperties1, float inInvMass1, MotionProperties *ioMotionProperties2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inMinLambda, float inMaxLambda)
 See: AxisConstraintPart::SolveVelocityConstraint.
 
bool SolvePositionConstraint (Body &ioBody1, float inInvMass1, Body &ioBody2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inC, float inBaumgarte) const
 See: AxisConstraintPart::SolvePositionConstraint.
 
- Public Member Functions inherited from ContactConstraintPart1< Type1 >
void Deactivate ()
 Deactivate this constraint.
 
bool IsActive () const
 Check if constraint is active.
 
void SetTotalLambda (float inLambda)
 Override total lagrange multiplier, can be used to set the initial value for warm starting.
 
float GetTotalLambda () const
 Return lagrange multiplier.
 

Additional Inherited Members

- Protected Attributes inherited from ContactConstraintPart1< Type1 >
float mEffectiveMass
 
float mTotalLambda
 
float mBias
 

Detailed Description

template<EMotionType Type1, EMotionType Type2>
class ContactConstraintPart< Type1, Type2 >

This is a copy of AxisConstraintPart, specialized to handle contact constraints. See the documentation of AxisConstraintPart for more documentation behind the math. Warning: Make sure there is 1 float of padding after this class because we read using Vec3::sLoadFloat3Unsafe and a Float3 is the last member.

Member Function Documentation

◆ CalculateConstraintProperties()

template<EMotionType Type1, EMotionType Type2>
JPH_INLINE void ContactConstraintPart< Type1, Type2 >::CalculateConstraintProperties ( float inInvMass1,
Mat44Arg inInvI1,
Vec3Arg inR1PlusU,
float inInvMass2,
Mat44Arg inInvI2,
Vec3Arg inR2,
Vec3Arg inWorldSpaceAxis,
float inBias = 0.0f )
inline

◆ SolvePositionConstraint()

template<EMotionType Type1, EMotionType Type2>
bool ContactConstraintPart< Type1, Type2 >::SolvePositionConstraint ( Body & ioBody1,
float inInvMass1,
Body & ioBody2,
float inInvMass2,
Vec3Arg inWorldSpaceAxis,
float inC,
float inBaumgarte ) const
inline

◆ SolveVelocityConstraint()

template<EMotionType Type1, EMotionType Type2>
JPH_INLINE bool ContactConstraintPart< Type1, Type2 >::SolveVelocityConstraint ( MotionProperties * ioMotionProperties1,
float inInvMass1,
MotionProperties * ioMotionProperties2,
float inInvMass2,
Vec3Arg inWorldSpaceAxis,
float inMinLambda,
float inMaxLambda )
inline

◆ SolveVelocityConstraintApplyLambda()

template<EMotionType Type1, EMotionType Type2>
JPH_INLINE bool ContactConstraintPart< Type1, Type2 >::SolveVelocityConstraintApplyLambda ( MotionProperties * ioMotionProperties1,
float inInvMass1,
MotionProperties * ioMotionProperties2,
float inInvMass2,
Vec3Arg inWorldSpaceAxis,
float inTotalLambda )
inline

Part 2 of AxisConstraint::SolveVelocityConstraint: apply new lambda.

◆ SolveVelocityConstraintGetTotalLambda()

template<EMotionType Type1, EMotionType Type2>
JPH_INLINE float ContactConstraintPart< Type1, Type2 >::SolveVelocityConstraintGetTotalLambda ( const MotionProperties * ioMotionProperties1,
const MotionProperties * ioMotionProperties2,
Vec3Arg inWorldSpaceAxis ) const
inline

Part 1 of AxisConstraint::SolveVelocityConstraint: get the total lambda.

◆ WarmStart()

template<EMotionType Type1, EMotionType Type2>
void ContactConstraintPart< Type1, Type2 >::WarmStart ( MotionProperties * ioMotionProperties1,
float inInvMass1,
MotionProperties * ioMotionProperties2,
float inInvMass2,
Vec3Arg inWorldSpaceAxis,
float inWarmStartImpulseRatio )
inline

The documentation for this class was generated from the following file: