12class [[nodiscard]] alignas(JPH_VECTOR_ALIGNMENT)
Mat44
31 static JPH_INLINE
Mat44 sZero();
34 static JPH_INLINE
Mat44 sIdentity();
37 static JPH_INLINE
Mat44 sNaN();
40 static JPH_INLINE
Mat44 sLoadFloat4x4(
const Float4 *inV);
43 static JPH_INLINE
Mat44 sLoadFloat4x4Aligned(
const Float4 *inV);
46 static JPH_INLINE
Mat44 sRotationX(
float inX);
47 static JPH_INLINE
Mat44 sRotationY(
float inY);
48 static JPH_INLINE
Mat44 sRotationZ(
float inZ);
51 static JPH_INLINE
Mat44 sRotation(
Vec3Arg inAxis,
float inAngle);
66 static JPH_INLINE
Mat44 sScale(
float inScale);
90 JPH_INLINE
float operator () (
uint inRow,
uint inColumn)
const {
JPH_ASSERT(inRow < 4);
JPH_ASSERT(inColumn < 4);
return mCol[inColumn].mF32[inRow]; }
94 JPH_INLINE
bool operator == (
Mat44Arg inM2)
const;
95 JPH_INLINE
bool operator != (
Mat44Arg inM2)
const {
return !(*
this == inM2); }
98 JPH_INLINE
bool IsClose(
Mat44Arg inM2,
float inMaxDistSq = 1.0e-12f)
const;
111 JPH_INLINE
Vec3 Multiply3x3Transposed(
Vec3Arg inV)
const;
117 JPH_INLINE
Mat44 Multiply3x3LeftTransposed(
Mat44Arg inM)
const;
120 JPH_INLINE
Mat44 Multiply3x3RightTransposed(
Mat44Arg inM)
const;
127 JPH_INLINE
Mat44 & operator *= (
float inV);
133 JPH_INLINE
Mat44 operator - ()
const;
160 JPH_INLINE
void StoreFloat4x4(
Float4 *outV)
const;
163 JPH_INLINE
Mat44 Transposed()
const;
166 JPH_INLINE
Mat44 Transposed3x3()
const;
169 JPH_INLINE
Mat44 Inversed()
const;
172 JPH_INLINE
Mat44 InversedRotationTranslation()
const;
175 JPH_INLINE
float GetDeterminant3x3()
const;
178 JPH_INLINE
Mat44 Adjointed3x3()
const;
181 JPH_INLINE
Mat44 Inversed3x3()
const;
184 JPH_INLINE
Mat44 GetRotation()
const;
187 JPH_INLINE
Mat44 GetRotationSafe()
const;
190 JPH_INLINE
void SetRotation(
Mat44Arg inRotation);
193 JPH_INLINE
Quat GetQuaternion()
const;
199 JPH_INLINE
Mat44 PreTranslated(
Vec3Arg inTranslation)
const;
202 JPH_INLINE
Mat44 PostTranslated(
Vec3Arg inTranslation)
const;
214 JPH_INLINE
Mat44 Decompose(
Vec3 &outScale)
const;
216#ifndef JPH_DOUBLE_PRECISION
222 friend ostream & operator << (ostream &inStream,
Mat44Arg inM)
224 inStream << inM.mCol[0] <<
", " << inM.mCol[1] <<
", " << inM.mCol[2] <<
", " << inM.mCol[3];
232static_assert(is_trivial<Mat44>(),
"Is supposed to be a trivial type!");
unsigned int uint
Definition Core.h:309
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
DVec3 operator*(double inV1, DVec3Arg inV2)
Definition DVec3.inl:447
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
const Mat44 & Mat44Arg
Definition MathTypes.h:31
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:29
Class that holds 4 float values. Convert to Vec4 to perform calculations.
Definition Float4.h:11
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 GetAxisY() const
Definition Mat44.h:144
JPH_INLINE void SetAxisX(Vec3Arg inV)
Definition Mat44.h:143
JPH_INLINE void SetColumn3(uint inCol, Vec3Arg inV)
Definition Mat44.h:155
JPH_INLINE Vec3 GetAxisZ() const
Definition Mat44.h:146
JPH_INLINE Mat44 Transposed3x3() const
Transpose 3x3 subpart of matrix.
Definition Mat44.inl:493
JPH_INLINE Mat44 GetDirectionPreservingMatrix() const
Get matrix that transforms a direction with the same transform as this matrix (length is not preserve...
Definition Mat44.h:196
JPH_INLINE void SetDiagonal4(Vec4Arg inV)
Definition Mat44.h:153
JPH_INLINE Mat44 ToMat44() const
In single precision mode just return the matrix itself.
Definition Mat44.h:218
Vec4::Type Type
Definition Mat44.h:18
JPH_INLINE void SetAxisZ(Vec3Arg inV)
Definition Mat44.h:147
JPH_INLINE Vec3 GetColumn3(uint inCol) const
Definition Mat44.h:154
JPH_INLINE Vec3 GetDiagonal3() const
Definition Mat44.h:150
JPH_INLINE Vec4 GetColumn4(uint inCol) const
Definition Mat44.h:156
JPH_INLINE Vec3 GetAxisX() const
Access to the columns.
Definition Mat44.h:142
JPH_INLINE void SetDiagonal3(Vec3Arg inV)
Definition Mat44.h:151
Mat44(const Mat44 &inM2)=default
JPH_INLINE Vec3 GetTranslation() const
Definition Mat44.h:148
JPH_INLINE void SetColumn4(uint inCol, Vec4Arg inV)
Definition Mat44.h:157
Mat44()=default
Constructor.
JPH_INLINE Mat44 Inversed3x3() const
Inverse 3x3 matrix.
Definition Mat44.inl:883
JPH_INLINE void SetAxisY(Vec3Arg inV)
Definition Mat44.h:145
JPH_INLINE void SetTranslation(Vec3Arg inV)
Definition Mat44.h:149
JPH_INLINE Vec4 GetDiagonal4() const
Definition Mat44.h:152
JPH_INLINE float GetX() const
Get individual components.
Definition Vec3.h:122
JPH_INLINE float GetY() const
Definition Vec3.h:123
JPH_INLINE float GetZ() const
Definition Vec3.h:124
JPH_INLINE float GetW() const
Definition Vec4.h:115
JPH_INLINE float GetX() const
Get individual components.
Definition Vec4.h:112
struct { float mData[4];} Type
Definition Vec4.h:24
JPH_INLINE float GetZ() const
Definition Vec4.h:114
JPH_INLINE float GetY() const
Definition Vec4.h:113