15 static constexpr float cMinScale = 1.0e-6f;
18 static constexpr float cScaleToleranceSq = 1.0e-8f;
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
uint CountBits(uint32 inValue)
Count the number of 1 bits in a value.
Definition Math.h:161
constexpr float cDefaultConvexRadius
How much padding to add around objects.
Definition PhysicsSettings.h:16
@ SWIZZLE_Z
Use the Z component.
Definition Swizzle.h:14
@ SWIZZLE_X
Use the X component.
Definition Swizzle.h:12
@ SWIZZLE_Y
Use the Y component.
Definition Swizzle.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 Mat44 Multiply3x3LeftTransposed(Mat44Arg inM) const
Multiply transpose of 3x3 matrix by 3x3 matrix ( )
Definition Mat44.inl:383
JPH_INLINE Mat44 PostScaled(Vec3Arg inScale) const
Scale a matrix: result = Mat44::sScale(inScale) * this.
Definition Mat44.inl:913
JPH_INLINE Vec3 GetDiagonal3() const
Definition Mat44.h:154
JPH_INLINE Vec4 GetColumn4(uint inCol) const
Definition Mat44.h:160
static JPH_INLINE Mat44 sRotation(Vec3Arg inAxis, float inAngle)
Rotate around arbitrary axis.
Definition Mat44.inl:139
JPH_INLINE bool TestAllTrue() const
Test if all components are true (true is when highest bit of component is set)
Definition UVec4.inl:408
JPH_INLINE bool TestAnyXYZTrue() const
Test if any of X, Y or Z components are true (true is when highest bit of component is set)
Definition UVec4.inl:403
static JPH_INLINE UVec4 sAnd(UVec4Arg inV1, UVec4Arg inV2)
Logical and (component wise)
Definition UVec4.inl:202
JPH_INLINE bool IsClose(Vec3Arg inV2, float inMaxDistSq=1.0e-12f) const
Test if two vectors are close.
Definition Vec3.inl:346
static JPH_INLINE Vec3 sMax(Vec3Arg inV1, Vec3Arg inV2)
Return the maximum of each of the components.
Definition Vec3.inl:159
JPH_INLINE float GetX() const
Get individual components.
Definition Vec3.h:124
JPH_INLINE float ReduceMin() const
Get the minimum of X, Y and Z.
Definition Vec3.inl:812
JPH_INLINE Vec3 Abs() const
Return the absolute value of each of the components.
Definition Vec3.inl:576
JPH_INLINE float GetY() const
Definition Vec3.h:125
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition Vec3.inl:107
static JPH_INLINE UVec4 sLess(Vec3Arg inV1, Vec3Arg inV2)
Less than (component wise)
Definition Vec3.inl:192
static JPH_INLINE Vec3 sReplicate(float inV)
Replicate inV across all components.
Definition Vec3.inl:118
JPH_INLINE float GetZ() const
Definition Vec3.h:126
JPH_INLINE Vec3 GetSign() const
Get vector that contains the sign of each element (returns 1.0f if positive, -1.0f if negative)
Definition Vec3.inl:840
JPH_INLINE Vec3 Swizzle() const
Swizzle the elements in inV.
JPH_INLINE Vec4 Abs() const
Return the absolute value of each of the components.
Definition Vec4.inl:602
static JPH_INLINE UVec4 sLess(Vec4Arg inV1, Vec4Arg inV2)
Less than (component wise)
Definition Vec4.inl:180
static JPH_INLINE Vec4 sZero()
Vector with all zeros.
Definition Vec4.inl:63
static JPH_INLINE Vec4 sSelect(Vec4Arg inNotSet, Vec4Arg inSet, UVec4Arg inControl)
Component wise select, returns inNotSet when highest bit of inControl = 0 and inSet when highest bit ...
Definition Vec4.inl:254
static JPH_INLINE Vec4 sReplicate(float inV)
Replicate inV across all components.
Definition Vec4.inl:74
Helper functions to get properties of a scaling vector.
Definition ScaleHelpers.h:13
bool CanScaleBeRotated(QuatArg inRotation, Vec3Arg inScale)
Definition ScaleHelpers.h:51
Vec3 MakeUniformScaleXZ(Vec3Arg inScale)
Average the scale in XZ, used to make the scale uniform when a shape doesn't support non-uniform scal...
Definition ScaleHelpers.h:45
Vec3 MakeUniformScale(Vec3Arg inScale)
Get the average scale if inScale, used to make the scale uniform when a shape doesn't support non-uni...
Definition ScaleHelpers.h:42
Vec3 RotateScale(QuatArg inRotation, Vec3Arg inScale)
Definition ScaleHelpers.h:75
float ScaleConvexRadius(float inConvexRadius, Vec3Arg inScale)
Scale the convex radius of an object.
Definition ScaleHelpers.h:30
bool IsZeroScale(Vec3Arg inScale)
Test if any of the components of the scale have a value below cMinScale.
Definition ScaleHelpers.h:36
Vec3 MakeNonZeroScale(Vec3Arg inScale)
Ensure that the scale for each component is at least cMinScale.
Definition ScaleHelpers.h:39
bool IsUniformScale(Vec3Arg inScale)
Test if a scale is uniform.
Definition ScaleHelpers.h:24
bool IsInsideOut(Vec3Arg inScale)
Test if a scale flips an object inside out (which requires flipping all normals and polygon windings)
Definition ScaleHelpers.h:33
bool IsUniformScaleXZ(Vec3Arg inScale)
Test if a scale is uniform in XZ.
Definition ScaleHelpers.h:27
bool IsNotScaled(Vec3Arg inScale)
Test if a scale is identity.
Definition ScaleHelpers.h:21