45    template <EMotionType Type1, EMotionType Type2>
 
   46    JPH_INLINE 
bool             ApplyVelocityStep(
MotionProperties *ioMotionProperties1, 
float inInvMass1, 
MotionProperties *ioMotionProperties2, 
float inInvMass2, 
Vec3Arg inWorldSpaceAxis, 
float inLambda)
 const 
   58            if constexpr (Type1 == EMotionType::Dynamic)
 
   63            if constexpr (Type2 == EMotionType::Dynamic)
 
   75    template <EMotionType Type1, EMotionType Type2>
 
   76    JPH_INLINE 
float            TemplatedCalculateInverseEffectiveMass(
float inInvMass1, 
Mat44Arg inInvI1, 
Vec3Arg inR1PlusU, 
float inInvMass2, 
Mat44Arg inInvI2, 
Vec3Arg inR2, 
Vec3Arg inWorldSpaceAxis)
 
   81        Vec3 r1_plus_u_x_axis;
 
   82        if constexpr (Type1 != EMotionType::Static)
 
   84            r1_plus_u_x_axis = inR1PlusU.
Cross(inWorldSpaceAxis);
 
   95        if constexpr (Type2 != EMotionType::Static)
 
   97            r2_x_axis = inR2.
Cross(inWorldSpaceAxis);
 
  108        float inv_effective_mass;
 
  110        if constexpr (Type1 == EMotionType::Dynamic)
 
  113            invi1_r1_plus_u_x_axis.
StoreFloat3(&mInvI1_R1PlusUxAxis);
 
  114            inv_effective_mass = inInvMass1 + invi1_r1_plus_u_x_axis.
Dot(r1_plus_u_x_axis);
 
  118            (void)r1_plus_u_x_axis; 
 
  120            inv_effective_mass = 0.0f;
 
  123        if constexpr (Type2 == EMotionType::Dynamic)
 
  127            inv_effective_mass += inInvMass2 + invi2_r2_x_axis.
Dot(r2_x_axis);
 
  135        return inv_effective_mass;
 
  139    JPH_INLINE 
float            CalculateInverseEffectiveMass(
const Body &inBody1, 
Vec3Arg inR1PlusU, 
const Body &inBody2, 
Vec3Arg inR2, 
Vec3Arg inWorldSpaceAxis)
 
  144        case EMotionType::Dynamic:
 
  151                case EMotionType::Dynamic:
 
  154                case EMotionType::Kinematic:
 
  155                    return TemplatedCalculateInverseEffectiveMass<EMotionType::Dynamic, EMotionType::Kinematic>(inv_m1, inv_i1, inR1PlusU, 0 , 
Mat44() , inR2, inWorldSpaceAxis);
 
  157                case EMotionType::Static:
 
  158                    return TemplatedCalculateInverseEffectiveMass<EMotionType::Dynamic, EMotionType::Static>(inv_m1, inv_i1, inR1PlusU, 0 , 
Mat44() , inR2, inWorldSpaceAxis);
 
  166        case EMotionType::Kinematic:
 
  170        case EMotionType::Static:
 
  183    JPH_INLINE 
float            CalculateInverseEffectiveMassWithMassOverride(
const Body &inBody1, 
float inInvMass1, 
float inInvInertiaScale1, 
Vec3Arg inR1PlusU, 
const Body &inBody2, 
float inInvMass2, 
float inInvInertiaScale2, 
Vec3Arg inR2, 
Vec3Arg inWorldSpaceAxis)
 
  188        case EMotionType::Dynamic:
 
  193                case EMotionType::Dynamic:
 
  194                    return TemplatedCalculateInverseEffectiveMass<EMotionType::Dynamic, EMotionType::Dynamic>(inInvMass1, inv_i1, inR1PlusU, inInvMass2, inInvInertiaScale2 * inBody2.
GetInverseInertia(), inR2, inWorldSpaceAxis);
 
  196                case EMotionType::Kinematic:
 
  197                    return TemplatedCalculateInverseEffectiveMass<EMotionType::Dynamic, EMotionType::Kinematic>(inInvMass1, inv_i1, inR1PlusU, 0 , 
Mat44() , inR2, inWorldSpaceAxis);
 
  199                case EMotionType::Static:
 
  200                    return TemplatedCalculateInverseEffectiveMass<EMotionType::Dynamic, EMotionType::Static>(inInvMass1, inv_i1, inR1PlusU, 0 , 
Mat44() , inR2, inWorldSpaceAxis);
 
  208        case EMotionType::Kinematic:
 
  210            return TemplatedCalculateInverseEffectiveMass<EMotionType::Kinematic, EMotionType::Dynamic>(0 , 
Mat44() , inR1PlusU, inInvMass2, inInvInertiaScale2 * inBody2.
GetInverseInertia(), inR2, inWorldSpaceAxis);
 
  212        case EMotionType::Static:
 
  214            return TemplatedCalculateInverseEffectiveMass<EMotionType::Static, EMotionType::Dynamic>(0 , 
Mat44() , inR1PlusU, inInvMass2, inInvInertiaScale2 * inBody2.
GetInverseInertia(), inR2, inWorldSpaceAxis);
 
  226    template <EMotionType Type1, EMotionType Type2>
 
  229        mEffectiveMass = 1.0f / TemplatedCalculateInverseEffectiveMass<Type1, Type2>(inInvMass1, inInvI1, inR1PlusU, inInvMass2, inInvI2, inR2, inWorldSpaceAxis);
 
  233        JPH_DET_LOG(
"TemplatedCalculateConstraintProperties: invM1: " << inInvMass1 << 
" invI1: " << inInvI1 << 
" r1PlusU: " << inR1PlusU << 
" invM2: " << inInvMass2 << 
" invI2: " << inInvI2 << 
" r2: " << inR2 << 
" bias: " << inBias << 
" r1PlusUxAxis: " << mR1PlusUxAxis << 
" r2xAxis: " << mR2xAxis << 
" invI1_R1PlusUxAxis: " << mInvI1_R1PlusUxAxis << 
" invI2_R2xAxis: " << mInvI2_R2xAxis << 
" effectiveMass: " << mEffectiveMass << 
" totalLambda: " << mTotalLambda);
 
  245        float inv_effective_mass = CalculateInverseEffectiveMass(inBody1, inR1PlusU, inBody2, inR2, inWorldSpaceAxis);
 
  247        if (inv_effective_mass == 0.0f)
 
  251            mEffectiveMass = 1.0f / inv_effective_mass;
 
  269        float inv_effective_mass = CalculateInverseEffectiveMassWithMassOverride(inBody1, inInvMass1, inInvInertiaScale1, inR1PlusU, inBody2, inInvMass2, inInvInertiaScale2, inR2, inWorldSpaceAxis);
 
  271        if (inv_effective_mass == 0.0f)
 
  275            mEffectiveMass = 1.0f / inv_effective_mass;
 
  293        float inv_effective_mass = CalculateInverseEffectiveMass(inBody1, inR1PlusU, inBody2, inR2, inWorldSpaceAxis);
 
  295        if (inv_effective_mass == 0.0f)
 
  314        float inv_effective_mass = CalculateInverseEffectiveMass(inBody1, inR1PlusU, inBody2, inR2, inWorldSpaceAxis);
 
  316        if (inv_effective_mass == 0.0f)
 
  325        float inv_effective_mass = CalculateInverseEffectiveMass(inBody1, inR1PlusU, inBody2, inR2, inWorldSpaceAxis);
 
  327        if (inv_effective_mass == 0.0f)
 
  329        else if (inSpringSettings.
mMode == ESpringMode::FrequencyAndDamping)
 
  338        mEffectiveMass = 0.0f;
 
  345        return mEffectiveMass != 0.0f;
 
  349    template <EMotionType Type1, EMotionType Type2>
 
  352        mTotalLambda *= inWarmStartImpulseRatio;
 
  354        ApplyVelocityStep<Type1, Type2>(ioMotionProperties1, inInvMass1, ioMotionProperties2, inInvMass2, inWorldSpaceAxis, mTotalLambda);
 
  372        if (motion_type1 == EMotionType::Dynamic)
 
  374            if (motion_type2 == EMotionType::Dynamic)
 
  375                TemplatedWarmStart<EMotionType::Dynamic, EMotionType::Dynamic>(motion_properties1, motion_properties1->
GetInverseMass(), motion_properties2, motion_properties2->
GetInverseMass(), inWorldSpaceAxis, inWarmStartImpulseRatio);
 
  377                TemplatedWarmStart<EMotionType::Dynamic, EMotionType::Static>(motion_properties1, motion_properties1->
GetInverseMass(), motion_properties2, 0.0f , inWorldSpaceAxis, inWarmStartImpulseRatio);
 
  381            JPH_ASSERT(motion_type2 == EMotionType::Dynamic);
 
  382            TemplatedWarmStart<EMotionType::Static, EMotionType::Dynamic>(motion_properties1, 0.0f , motion_properties2, motion_properties2->
GetInverseMass(), inWorldSpaceAxis, inWarmStartImpulseRatio);
 
  387    template <EMotionType Type1, EMotionType Type2>
 
  392        if constexpr (Type1 != EMotionType::Static && Type2 != EMotionType::Static)
 
  394        else if constexpr (Type1 != EMotionType::Static)
 
  396        else if constexpr (Type2 != EMotionType::Static)
 
  402        if constexpr (Type1 != EMotionType::Static)
 
  404        if constexpr (Type2 != EMotionType::Static)
 
  410        float lambda = mEffectiveMass * (jv - mSpringPart.
GetBias(mTotalLambda));
 
  413        return mTotalLambda + lambda;
 
  417    template <EMotionType Type1, EMotionType Type2>
 
  420        float delta_lambda = inTotalLambda - mTotalLambda; 
 
  421        mTotalLambda = inTotalLambda; 
 
  423        return ApplyVelocityStep<Type1, Type2>(ioMotionProperties1, inInvMass1, ioMotionProperties2, inInvMass2, inWorldSpaceAxis, delta_lambda);
 
  427    template <EMotionType Type1, EMotionType Type2>
 
  430        float total_lambda = TemplatedSolveVelocityConstraintGetTotalLambda<Type1, Type2>(ioMotionProperties1, ioMotionProperties2, inWorldSpaceAxis);
 
  433        total_lambda = 
Clamp(total_lambda, inMinLambda, inMaxLambda);
 
  435        return TemplatedSolveVelocityConstraintApplyLambda<Type1, Type2>(ioMotionProperties1, inInvMass1, ioMotionProperties2, inInvMass2, inWorldSpaceAxis, total_lambda);
 
  453        switch (motion_type1)
 
  455        case EMotionType::Dynamic:
 
  456            switch (motion_type2)
 
  458            case EMotionType::Dynamic:
 
  459                return TemplatedSolveVelocityConstraint<EMotionType::Dynamic, EMotionType::Dynamic>(motion_properties1, motion_properties1->
GetInverseMass(), motion_properties2, motion_properties2->
GetInverseMass(), inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  461            case EMotionType::Kinematic:
 
  462                return TemplatedSolveVelocityConstraint<EMotionType::Dynamic, EMotionType::Kinematic>(motion_properties1, motion_properties1->
GetInverseMass(), motion_properties2, 0.0f , inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  464            case EMotionType::Static:
 
  465                return TemplatedSolveVelocityConstraint<EMotionType::Dynamic, EMotionType::Static>(motion_properties1, motion_properties1->
GetInverseMass(), motion_properties2, 0.0f , inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  473        case EMotionType::Kinematic:
 
  474            JPH_ASSERT(motion_type2 == EMotionType::Dynamic);
 
  475            return TemplatedSolveVelocityConstraint<EMotionType::Kinematic, EMotionType::Dynamic>(motion_properties1, 0.0f , motion_properties2, motion_properties2->
GetInverseMass(), inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  477        case EMotionType::Static:
 
  478            JPH_ASSERT(motion_type2 == EMotionType::Dynamic);
 
  479            return TemplatedSolveVelocityConstraint<EMotionType::Static, EMotionType::Dynamic>(motion_properties1, 0.0f , motion_properties2, motion_properties2->
GetInverseMass(), inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  506        switch (motion_type1)
 
  508        case EMotionType::Dynamic:
 
  509            switch (motion_type2)
 
  511            case EMotionType::Dynamic:
 
  512                return TemplatedSolveVelocityConstraint<EMotionType::Dynamic, EMotionType::Dynamic>(motion_properties1, inInvMass1, motion_properties2, inInvMass2, inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  514            case EMotionType::Kinematic:
 
  515                return TemplatedSolveVelocityConstraint<EMotionType::Dynamic, EMotionType::Kinematic>(motion_properties1, inInvMass1, motion_properties2, 0.0f , inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  517            case EMotionType::Static:
 
  518                return TemplatedSolveVelocityConstraint<EMotionType::Dynamic, EMotionType::Static>(motion_properties1, inInvMass1, motion_properties2, 0.0f , inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  526        case EMotionType::Kinematic:
 
  527            JPH_ASSERT(motion_type2 == EMotionType::Dynamic);
 
  528            return TemplatedSolveVelocityConstraint<EMotionType::Kinematic, EMotionType::Dynamic>(motion_properties1, 0.0f , motion_properties2, inInvMass2, inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  530        case EMotionType::Static:
 
  531            JPH_ASSERT(motion_type2 == EMotionType::Dynamic);
 
  532            return TemplatedSolveVelocityConstraint<EMotionType::Static, EMotionType::Dynamic>(motion_properties1, 0.0f , motion_properties2, inInvMass2, inWorldSpaceAxis, inMinLambda, inMaxLambda);
 
  551        if (inC != 0.0f && !mSpringPart.
IsActive())
 
  558            float lambda = -mEffectiveMass * inBaumgarte * inC;
 
  602        if (inC != 0.0f && !mSpringPart.
IsActive())
 
  609            float lambda = -mEffectiveMass * inBaumgarte * inC;
 
  645        mTotalLambda = inLambda;
 
  657        inStream.
Write(mTotalLambda);
 
  663        inStream.
Read(mTotalLambda);
 
  669    Float3                      mInvI1_R1PlusUxAxis;
 
  671    float                       mEffectiveMass = 0.0f;
 
  673    float                       mTotalLambda = 0.0f;
 
#define JPH_IF_DEBUG(...)
Definition: Core.h:473
 
#define JPH_NAMESPACE_END
Definition: Core.h:354
 
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:348
 
#define JPH_DET_LOG(...)
By default we log nothing.
Definition: DeterminismLog.h:155
 
#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
 
EMotionType
Motion type of a physics body.
Definition: MotionType.h:11
 
Definition: AxisConstraintPart.h:43
 
float GetTotalLambda() const
Return lagrange multiplier.
Definition: AxisConstraintPart.h:649
 
bool SolveVelocityConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inWorldSpaceAxis, float inMinLambda, float inMaxLambda)
Definition: AxisConstraintPart.h:444
 
void CalculateConstraintPropertiesWithSettings(float inDeltaTime, const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, const SpringSettings &inSpringSettings)
Selects one of the above functions based on the spring settings.
Definition: AxisConstraintPart.h:323
 
bool SolvePositionConstraint(Body &ioBody1, Body &ioBody2, Vec3Arg inWorldSpaceAxis, float inC, float inBaumgarte) const
Definition: AxisConstraintPart.h:548
 
bool IsActive() const
Check if constraint is active.
Definition: AxisConstraintPart.h:343
 
void SetTotalLambda(float inLambda)
Override total lagrange multiplier, can be used to set the initial value for warm starting.
Definition: AxisConstraintPart.h:643
 
bool TemplatedSolveVelocityConstraint(MotionProperties *ioMotionProperties1, float inInvMass1, MotionProperties *ioMotionProperties2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inMinLambda, float inMaxLambda)
Templated form of SolveVelocityConstraint with the motion types baked in.
Definition: AxisConstraintPart.h:428
 
JPH_INLINE void TemplatedCalculateConstraintProperties(float inInvMass1, Mat44Arg inInvI1, Vec3Arg inR1PlusU, float inInvMass2, Mat44Arg inInvI2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias=0.0f)
Templated form of CalculateConstraintProperties with the motion types baked in.
Definition: AxisConstraintPart.h:227
 
void CalculateConstraintPropertiesWithFrequencyAndDamping(float inDeltaTime, const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, float inFrequency, float inDamping)
Definition: AxisConstraintPart.h:291
 
void WarmStart(Body &ioBody1, Body &ioBody2, Vec3Arg inWorldSpaceAxis, float inWarmStartImpulseRatio)
Definition: AxisConstraintPart.h:362
 
void Deactivate()
Deactivate this constraint.
Definition: AxisConstraintPart.h:336
 
void CalculateConstraintPropertiesWithMassOverride(const Body &inBody1, float inInvMass1, float inInvInertiaScale1, Vec3Arg inR1PlusU, const Body &inBody2, float inInvMass2, float inInvInertiaScale2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias=0.0f)
Definition: AxisConstraintPart.h:267
 
bool SolvePositionConstraintWithMassOverride(Body &ioBody1, float inInvMass1, Body &ioBody2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inC, float inBaumgarte) const
Definition: AxisConstraintPart.h:599
 
JPH_INLINE float TemplatedSolveVelocityConstraintGetTotalLambda(const MotionProperties *ioMotionProperties1, const MotionProperties *ioMotionProperties2, Vec3Arg inWorldSpaceAxis) const
Templated form of SolveVelocityConstraint with the motion types baked in, part 1: get the total lambd...
Definition: AxisConstraintPart.h:388
 
bool SolveVelocityConstraintWithMassOverride(Body &ioBody1, float inInvMass1, Body &ioBody2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inMinLambda, float inMaxLambda)
Definition: AxisConstraintPart.h:497
 
JPH_INLINE bool TemplatedSolveVelocityConstraintApplyLambda(MotionProperties *ioMotionProperties1, float inInvMass1, MotionProperties *ioMotionProperties2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inTotalLambda)
Templated form of SolveVelocityConstraint with the motion types baked in, part 2: apply new lambda.
Definition: AxisConstraintPart.h:418
 
void SaveState(StateRecorder &inStream) const
Save state of this constraint part.
Definition: AxisConstraintPart.h:655
 
void TemplatedWarmStart(MotionProperties *ioMotionProperties1, float inInvMass1, MotionProperties *ioMotionProperties2, float inInvMass2, Vec3Arg inWorldSpaceAxis, float inWarmStartImpulseRatio)
Templated form of WarmStart with the motion types baked in.
Definition: AxisConstraintPart.h:350
 
void CalculateConstraintPropertiesWithStiffnessAndDamping(float inDeltaTime, const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias, float inC, float inStiffness, float inDamping)
Definition: AxisConstraintPart.h:312
 
void CalculateConstraintProperties(const Body &inBody1, Vec3Arg inR1PlusU, const Body &inBody2, Vec3Arg inR2, Vec3Arg inWorldSpaceAxis, float inBias=0.0f)
Definition: AxisConstraintPart.h:243
 
void RestoreState(StateRecorder &inStream)
Restore state of this constraint part.
Definition: AxisConstraintPart.h:661
 
const MotionProperties * GetMotionProperties() const
Access to the motion properties.
Definition: Body.h:228
 
EMotionType GetMotionType() const
Motion type of this body.
Definition: Body.h:99
 
bool IsDynamic() const
Check if this body is dynamic, which means that it moves and forces can act on it.
Definition: Body.h:67
 
void AddRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime)
Update rotation using an Euler step (using during position integrate & constraint solving)
Definition: Body.inl:90
 
void SubPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime)
Definition: Body.h:263
 
Mat44 GetInverseInertia() const
Get inverse inertia tensor in world space.
Definition: Body.inl:129
 
void SubRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime)
Definition: Body.inl:109
 
const MotionProperties * GetMotionPropertiesUnchecked() const
Access to the motion properties (version that does not check if the object is kinematic or dynamic)
Definition: Body.h:232
 
void AddPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime)
Update position using an Euler step (used during position integrate & constraint solving)
Definition: Body.h:262
 
Class that holds 3 floats. Used as a storage class. Convert to Vec3 for calculations.
Definition: Float3.h:13
 
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition: Mat44.h:13
 
JPH_INLINE Vec3 Multiply3x3(Vec3Arg inV) const
Multiply vector by only 3x3 part of the matrix.
Definition: Mat44.inl:307
 
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:157
 
Vec3 GetLinearVelocity() const
Get world space linear velocity of the center of mass.
Definition: MotionProperties.h:43
 
Vec3 GetAngularVelocity() const
Get world space angular velocity of the center of mass.
Definition: MotionProperties.h:52
 
void SubLinearVelocityStep(Vec3Arg inLinearVelocityChange)
Definition: MotionProperties.h:158
 
float GetInverseMass() const
Get inverse mass (1 / mass). Should only be called on a dynamic object (static or kinematic bodies ha...
Definition: MotionProperties.h:95
 
void SubAngularVelocityStep(Vec3Arg inAngularVelocityChange)
Definition: MotionProperties.h:160
 
void AddAngularVelocityStep(Vec3Arg inAngularVelocityChange)
Definition: MotionProperties.h:159
 
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
 
float mStiffness
Definition: SpringSettings.h:56
 
float mDamping
Definition: SpringSettings.h:63
 
ESpringMode mMode
Definition: SpringSettings.h:44
 
float mFrequency
Definition: SpringSettings.h:51
 
Definition: StateRecorder.h:48
 
void Read(T &outT)
Read a primitive (e.g. float, int, etc.) from the binary stream.
Definition: StreamIn.h:29
 
void Write(const T &inT)
Write a primitive (e.g. float, int, etc.) to the binary stream.
Definition: StreamOut.h:26
 
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 bool IsNormalized(float inTolerance=1.0e-6f) const
Test if vector is normalized.
Definition: Vec3.inl:737
 
JPH_INLINE void StoreFloat3(Float3 *outV) const
Store 3 floats to memory.
Definition: Vec3.inl:757
 
static JPH_INLINE Vec3 sLoadFloat3Unsafe(const Float3 &inV)
Load 3 floats from memory (reads 32 bits extra which it doesn't use)
Definition: Vec3.inl:134
 
static JPH_INLINE Vec3 sNaN()
Vector with all NaN's.
Definition: Vec3.inl:129