Plasma Engine
2.0
Loading...
Searching...
No Matches
SimdMat4f.h
1
#pragma once
2
3
#include <Foundation/SimdMath/SimdVec4f.h>
4
6
class
PL_FOUNDATION_DLL
plSimdMat4f
7
{
8
public
:
9
PL_DECLARE_POD_TYPE();
10
11
plSimdMat4f
();
12
14
[[nodiscard]]
static
plSimdMat4f
MakeZero();
15
17
[[nodiscard]]
static
plSimdMat4f
MakeIdentity();
18
20
[[nodiscard]]
static
plSimdMat4f
MakeFromRowMajorArray(
const
float
*
const
pData);
21
23
[[nodiscard]]
static
plSimdMat4f
MakeFromColumnMajorArray(
const
float
*
const
pData);
24
26
[[nodiscard]]
static
plSimdMat4f
MakeFromColumns(
const
plSimdVec4f
& vCol0,
const
plSimdVec4f
& vCol1,
const
plSimdVec4f
& vCol2,
const
plSimdVec4f
& vCol3);
27
29
[[nodiscard]]
static
plSimdMat4f
MakeFromValues(
float
f1r1,
float
f2r1,
float
f3r1,
float
f4r1,
float
f1r2,
float
f2r2,
float
f3r2,
float
f4r2,
float
f1r3,
float
f2r3,
float
f3r3,
float
f4r3,
float
f1r4,
float
f2r4,
float
f3r4,
float
f4r4);
30
31
void
GetAsArray(
float
* out_pData,
plMatrixLayout::Enum
layout)
const
;
// [tested]
32
33
public
:
35
void
Transpose();
// [tested]
36
38
plSimdMat4f
GetTranspose()
const
;
// [tested]
39
41
plResult
Invert(
const
plSimdFloat
& fEpsilon = plMath::SmallEpsilon<float>());
// [tested]
42
44
plSimdMat4f
GetInverse(
const
plSimdFloat
& fEpsilon = plMath::SmallEpsilon<float>())
const
;
// [tested]
45
46
public
:
48
bool
IsEqual(
const
plSimdMat4f
& rhs,
const
plSimdFloat
& fEpsilon)
const
;
// [tested]
49
51
bool
IsIdentity(
const
plSimdFloat
& fEpsilon = plMath::DefaultEpsilon<float>())
const
;
// [tested]
52
54
bool
IsValid()
const
;
// [tested]
55
57
bool
IsNaN()
const
;
// [tested]
58
59
public
:
60
void
SetRows(
const
plSimdVec4f
& vRow0,
const
plSimdVec4f
& vRow1,
const
plSimdVec4f
& vRow2,
const
plSimdVec4f
& vRow3);
// [tested]
61
void
GetRows(
plSimdVec4f
& ref_vRow0,
plSimdVec4f
& ref_vRow1,
plSimdVec4f
& ref_vRow2,
plSimdVec4f
& ref_vRow3)
const
;
// [tested]
62
63
public
:
65
[[nodiscard]]
plSimdVec4f
TransformPosition(
const
plSimdVec4f
& v)
const
;
// [tested]
66
68
[[nodiscard]]
plSimdVec4f
TransformDirection(
const
plSimdVec4f
& v)
const
;
// [tested]
69
70
[[nodiscard]]
plSimdMat4f
operator*(
const
plSimdMat4f
& rhs)
const
;
// [tested]
71
void
operator*=(
const
plSimdMat4f
& rhs);
72
73
[[nodiscard]]
bool
operator==(
const
plSimdMat4f
& rhs)
const
;
// [tested]
74
[[nodiscard]]
bool
operator!=(
const
plSimdMat4f
& rhs)
const
;
// [tested]
75
76
public
:
77
plSimdVec4f
m_col0;
78
plSimdVec4f
m_col1;
79
plSimdVec4f
m_col2;
80
plSimdVec4f
m_col3;
81
};
82
83
#include <Foundation/SimdMath/Implementation/SimdMat4f_inl.h>
84
85
#if PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_SSE
86
# include <Foundation/SimdMath/Implementation/SSE/SSEMat4f_inl.h>
87
#elif PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_FPU
88
# include <Foundation/SimdMath/Implementation/FPU/FPUMat4f_inl.h>
89
#elif PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_NEON
90
# include <Foundation/SimdMath/Implementation/NEON/NEONMat4f_inl.h>
91
#else
92
# error "Unknown SIMD implementation."
93
#endif
plSimdFloat
Definition
SimdFloat.h:7
plSimdMat4f
A 4x4 matrix class.
Definition
SimdMat4f.h:7
plSimdVec4f
A 4-component SIMD vector class.
Definition
SimdVec4f.h:8
plMatrixLayout::Enum
Enum
Definition
Declarations.h:65
plResult
Default enum for returning failure or success, instead of using a bool.
Definition
Types.h:54
Code
Engine
Foundation
SimdMath
SimdMat4f.h
Generated by
1.11.0