24 mCol {
inM.GetColumn4(0),
inM.GetColumn4(1),
inM.GetColumn4(2) },
25 mCol3(
inM.GetTranslation())
42 return DMat44(
Vec4(1, 0, 0, 0),
Vec4(0, 1, 0, 0),
Vec4(0, 0, 1, 0),
DVec3::sZero());
49 dm.SetTranslation(-
dm.Multiply3x3(
inT));
55 return mCol[0] ==
inM2.mCol[0]
56 && mCol[1] ==
inM2.mCol[1]
57 && mCol[2] ==
inM2.mCol[2]
58 && mCol3 ==
inM2.mCol3;
63 for (
int i = 0;
i < 3; ++
i)
71#if defined(JPH_USE_AVX)
76#elif defined(JPH_USE_SSE)
83#elif defined(JPH_USE_NEON)
100#if defined(JPH_USE_AVX)
105#elif defined(JPH_USE_SSE)
119#elif defined(JPH_USE_NEON)
135 mCol3.
mF64[0] +
double(mCol[0].
mF32[0]) *
inV.mF64[0] +
double(mCol[1].
mF32[0]) *
inV.mF64[1] +
double(mCol[2].
mF32[0]) *
inV.mF64[2],
136 mCol3.
mF64[1] +
double(mCol[0].
mF32[1]) *
inV.mF64[0] +
double(mCol[1].
mF32[1]) *
inV.mF64[1] +
double(mCol[2].
mF32[1]) *
inV.mF64[2],
137 mCol3.
mF64[2] +
double(mCol[0].
mF32[2]) *
inV.mF64[0] +
double(mCol[1].
mF32[2]) *
inV.mF64[1] +
double(mCol[2].
mF32[2]) *
inV.mF64[2]);
143#if defined(JPH_USE_AVX)
148#elif defined(JPH_USE_SSE)
162#elif defined(JPH_USE_NEON)
178 double(mCol[0].mF32[0]) *
inV.mF64[0] +
double(mCol[1].
mF32[0]) *
inV.mF64[1] +
double(mCol[2].
mF32[0]) *
inV.mF64[2],
179 double(mCol[0].
mF32[1]) *
inV.mF64[0] +
double(mCol[1].
mF32[1]) *
inV.mF64[1] +
double(mCol[2].
mF32[1]) *
inV.mF64[2],
180 double(mCol[0].
mF32[2]) *
inV.mF64[0] +
double(mCol[1].
mF32[2]) *
inV.mF64[1] +
double(mCol[2].
mF32[2]) *
inV.mF64[2]);
189#if defined(JPH_USE_SSE)
190 for (
int i = 0;
i < 3; ++
i)
198#elif defined(JPH_USE_NEON)
199 for (
int i = 0;
i < 3; ++
i)
208 for (
int i = 0;
i < 3; ++
i)
216 result.mCol3 = *
this *
inM.GetTranslation();
226#if defined(JPH_USE_SSE)
227 for (
int i = 0;
i < 3; ++
i)
235#elif defined(JPH_USE_NEON)
236 for (
int i = 0;
i < 3; ++
i)
245 for (
int i = 0;
i < 3; ++
i)
253 result.mCol3 = *
this *
inM.GetTranslation();
299 m.mCol3 = -
m.Multiply3x3(mCol3);
306 m.mCol3 = -
m.Multiply3x3(mCol3);
#define JPH_NAMESPACE_END
Definition Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition Core.h:361
AllocateFunction Allocate
Definition Memory.cpp:59
Holds a 4x4 matrix of floats with the last column consisting of doubles.
Definition DMat44.h:13
JPH_INLINE bool operator==(DMat44Arg inM2) const
Comparison.
Definition DMat44.inl:53
DVec3::TypeArg DTypeArg
Definition DMat44.h:20
JPH_INLINE Vec4 GetColumn4(uint inCol) const
Definition DMat44.h:115
JPH_INLINE DMat44 PostTranslated(Vec3Arg inTranslation) const
Post multiply by translation matrix: result = Mat44::sTranslation(inTranslation) * this (i....
Definition DMat44.inl:286
JPH_INLINE Mat44 Transposed3x3() const
Transpose 3x3 subpart of matrix.
Definition DMat44.h:119
JPH_INLINE DMat44 PreTranslated(Vec3Arg inTranslation) const
Pre multiply by translation matrix: result = this * Mat44::sTranslation(inTranslation)
Definition DMat44.inl:276
static JPH_INLINE DMat44 sZero()
Zero matrix.
Definition DMat44.inl:35
DMat44()=default
Constructor.
static JPH_INLINE DMat44 sIdentity()
Identity matrix.
Definition DMat44.inl:40
JPH_INLINE Vec3 Multiply3x3(Vec3Arg inV) const
Multiply vector by only 3x3 part of the matrix.
Definition DMat44.h:78
JPH_INLINE DMat44 PostScaled(Vec3Arg inScale) const
Scale a matrix: result = Mat44::sScale(inScale) * this.
Definition DMat44.inl:270
static JPH_INLINE DMat44 sInverseRotationTranslation(QuatArg inR, DVec3Arg inT)
Get inverse matrix of sRotationTranslation.
Definition DMat44.inl:45
JPH_INLINE void SetRotation(Mat44Arg inRotation)
Updates the rotation part of this matrix (the first 3 columns)
Definition DMat44.inl:258
JPH_INLINE DMat44 PreScaled(Vec3Arg inScale) const
Scale a matrix: result = this * Mat44::sScale(inScale)
Definition DMat44.inl:265
JPH_INLINE DMat44 InversedRotationTranslation() const
Inverse 4x4 matrix when it only contains rotation and translation.
Definition DMat44.inl:303
JPH_INLINE DMat44 Inversed() const
Inverse 4x4 matrix.
Definition DMat44.inl:296
JPH_INLINE DVec3 GetTranslation() const
Definition DMat44.h:111
JPH_INLINE DMat44 operator*(Mat44Arg inM) const
Multiply matrix by matrix.
Definition DMat44.inl:184
JPH_INLINE bool IsClose(DMat44Arg inM2, float inMaxDistSq=1.0e-12f) const
Test if two matrices are close.
Definition DMat44.inl:61
JPH_INLINE Mat44 GetRotation() const
Get rotation part only (note: retains the first 3 values from the bottom row)
Definition DMat44.h:128
Vec4::Type Type
Definition DMat44.h:18
double mF64[4]
Definition DVec3.h:280
static JPH_INLINE Type sFixW(TypeArg inValue)
Internal helper function that ensures that the Z component is replicated to the W component to preven...
Definition DVec3.inl:92
Type mValue
Definition DVec3.h:279
JPH_INLINE bool IsClose(DVec3Arg inV2, double inMaxDistSq=1.0e-24) const
Test if two vectors are close.
Definition DVec3.inl:410
static JPH_INLINE DVec3 sZero()
Vector with all zeros.
Definition DVec3.inl:120
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
static JPH_INLINE Mat44 sRotation(Vec3Arg inAxis, float inAngle)
Rotate around arbitrary axis.
Definition Mat44.inl:139
float mF32[4]
Definition Vec4.h:275
static JPH_INLINE Vec4 sZero()
Vector with all zeros.
Definition Vec4.inl:63
Type mValue
Definition Vec4.h:274
JPH_INLINE float GetZ() const
Definition Vec4.h:115
JPH_INLINE float GetY() const
Definition Vec4.h:114