12class [[nodiscard]] alignas(JPH_VECTOR_ALIGNMENT)
Mat44
32 static JPH_INLINE
Mat44 sZero();
35 static JPH_INLINE
Mat44 sIdentity();
38 static JPH_INLINE
Mat44 sNaN();
41 static JPH_INLINE
Mat44 sLoadFloat4x4(
const Float4 *inV);
44 static JPH_INLINE
Mat44 sLoadFloat4x4Aligned(
const Float4 *inV);
47 static JPH_INLINE
Mat44 sRotationX(
float inX);
48 static JPH_INLINE
Mat44 sRotationY(
float inY);
49 static JPH_INLINE
Mat44 sRotationZ(
float inZ);
52 static JPH_INLINE
Mat44 sRotation(
Vec3Arg inAxis,
float inAngle);
67 static JPH_INLINE
Mat44 sScale(
float inScale);
91 static JPH_INLINE
Mat44 sPerspective(
float inFovY,
float inAspect,
float inNear,
float inFar);
94 JPH_INLINE
float operator () (
uint inRow,
uint inColumn)
const {
JPH_ASSERT(inRow < 4);
JPH_ASSERT(inColumn < 4);
return mCol[inColumn].mF32[inRow]; }
98 JPH_INLINE
bool operator == (
Mat44Arg inM2)
const;
99 JPH_INLINE
bool operator != (
Mat44Arg inM2)
const {
return !(*
this == inM2); }
102 JPH_INLINE
bool IsClose(
Mat44Arg inM2,
float inMaxDistSq = 1.0e-12f)
const;
115 JPH_INLINE
Vec3 Multiply3x3Transposed(
Vec3Arg inV)
const;
121 JPH_INLINE
Mat44 Multiply3x3LeftTransposed(
Mat44Arg inM)
const;
124 JPH_INLINE
Mat44 Multiply3x3RightTransposed(
Mat44Arg inM)
const;
131 JPH_INLINE
Mat44 & operator *= (
float inV);
137 JPH_INLINE
Mat44 operator - ()
const;
164 JPH_INLINE
void StoreFloat4x4(
Float4 *outV)
const;
167 JPH_INLINE
Mat44 Transposed()
const;
170 JPH_INLINE
Mat44 Transposed3x3()
const;
173 JPH_INLINE
Mat44 Inversed()
const;
176 JPH_INLINE
Mat44 InversedRotationTranslation()
const;
179 JPH_INLINE
float GetDeterminant3x3()
const;
182 JPH_INLINE
Mat44 Adjointed3x3()
const;
185 JPH_INLINE
Mat44 Inversed3x3()
const;
188 JPH_INLINE
bool SetInversed3x3(
Mat44Arg inM);
191 JPH_INLINE
Mat44 GetRotation()
const;
194 JPH_INLINE
Mat44 GetRotationSafe()
const;
197 JPH_INLINE
void SetRotation(
Mat44Arg inRotation);
200 JPH_INLINE
Quat GetQuaternion()
const;
206 JPH_INLINE
Mat44 PreTranslated(
Vec3Arg inTranslation)
const;
209 JPH_INLINE
Mat44 PostTranslated(
Vec3Arg inTranslation)
const;
221 JPH_INLINE
Mat44 Decompose(
Vec3 &outScale)
const;
223#ifndef JPH_DOUBLE_PRECISION
229 friend ostream & operator << (ostream &inStream,
Mat44Arg inM)
231 inStream << inM.mCol[0] <<
", " << inM.mCol[1] <<
", " << inM.mCol[2] <<
", " << inM.mCol[3];
239static_assert(std::is_trivial<Mat44>(),
"Is supposed to be a trivial type!");
unsigned int uint
Definition Core.h:481
#define JPH_NAMESPACE_END
Definition Core.h:414
#define JPH_NAMESPACE_BEGIN
Definition Core.h:408
DVec3 operator*(double inV1, DVec3Arg inV2)
Definition DVec3.inl:451
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
const Mat44 & Mat44Arg
Definition MathTypes.h:29
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:31
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:148
JPH_INLINE void SetAxisX(Vec3Arg inV)
Definition Mat44.h:147
JPH_INLINE void SetColumn3(uint inCol, Vec3Arg inV)
Definition Mat44.h:159
JPH_INLINE Vec3 GetAxisZ() const
Definition Mat44.h:150
JPH_INLINE Mat44 Transposed3x3() const
Transpose 3x3 subpart of matrix.
Definition Mat44.inl:502
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:203
JPH_INLINE void SetDiagonal4(Vec4Arg inV)
Definition Mat44.h:157
JPH_INLINE Mat44 ToMat44() const
In single precision mode just return the matrix itself.
Definition Mat44.h:225
Vec4::Type Type
Definition Mat44.h:18
JPH_INLINE void SetAxisZ(Vec3Arg inV)
Definition Mat44.h:151
JPH_INLINE Vec3 GetColumn3(uint inCol) const
Definition Mat44.h:158
JPH_INLINE Vec3 GetDiagonal3() const
Definition Mat44.h:154
JPH_INLINE Vec4 GetColumn4(uint inCol) const
Definition Mat44.h:160
JPH_INLINE Vec3 GetAxisX() const
Access to the columns.
Definition Mat44.h:146
JPH_INLINE void SetDiagonal3(Vec3Arg inV)
Definition Mat44.h:155
Mat44(const Mat44 &inM2)=default
JPH_INLINE Vec3 GetTranslation() const
Definition Mat44.h:152
JPH_INLINE void SetColumn4(uint inCol, Vec4Arg inV)
Definition Mat44.h:161
Mat44()=default
Constructor.
JPH_INLINE Mat44 Inversed3x3() const
Inverse 3x3 matrix.
Definition Mat44.inl:753
JPH_INLINE void SetAxisY(Vec3Arg inV)
Definition Mat44.h:149
JPH_INLINE void SetTranslation(Vec3Arg inV)
Definition Mat44.h:153
JPH_INLINE Vec4 GetDiagonal4() const
Definition Mat44.h:156
JPH_INLINE float GetX() const
Get individual components.
Definition Vec3.h:124
JPH_INLINE float GetY() const
Definition Vec3.h:125
JPH_INLINE float GetZ() const
Definition Vec3.h:126
JPH_INLINE float GetW() const
Definition Vec4.h:116
JPH_INLINE float GetX() const
Get individual components.
Definition Vec4.h:113
{ float mData[4] Type
Definition Vec4.h:24
JPH_INLINE float GetZ() const
Definition Vec4.h:115
JPH_INLINE float GetY() const
Definition Vec4.h:114