6#ifndef ACTIVE_GEOMETRY_MATRIX_3x3
7#define ACTIVE_GEOMETRY_MATRIX_3x3
22 using row_t = std::array<double, 3>;
24 using base_t = std::array<row_t, 3>;
26 using Unique = std::unique_ptr<Matrix3x3>;
28 using Shared = std::shared_ptr<Matrix3x3>;
30 using Option = std::optional<Matrix3x3>;
83 Matrix3x3(
double a1,
double b1,
double c1,
84 double a2,
double b2,
double c2,
85 double a3,
double b3,
double c3);
118 const row_t&
operator[](
unsigned short index)
const {
return m_matrix[index]; }
124 row_t&
operator[](
unsigned short index) {
return m_matrix[index]; }
131 const double&
operator()(
unsigned short row,
unsigned short col)
const {
return m_matrix[row][col]; }
138 double&
operator()(
unsigned short row,
unsigned short col) {
return m_matrix[row][col]; }
A 3x3 matrix class.
Definition Matrix3x3.h:16
std::unique_ptr< Matrix3x3 > Unique
Unique pointer.
Definition Matrix3x3.h:26
static Matrix3x3 createIdentity()
Definition Matrix3x3.cpp:101
row_t & operator[](unsigned short index)
Definition Matrix3x3.h:124
double & operator()(unsigned short row, unsigned short col)
Definition Matrix3x3.h:138
std::optional< Matrix3x3 > Option
Optional.
Definition Matrix3x3.h:30
static Matrix3x3 createScale(double x, double y, double z)
Definition Matrix3x3.cpp:68
Matrix3x3 getInverse() const
Definition Matrix3x3.cpp:198
Matrix3x3 operator*(const Matrix3x3 &ref) const
Definition Matrix3x3.cpp:178
static Matrix3x3 createTranslate(double x, double y, double z)
Definition Matrix3x3.cpp:86
static Matrix3x3 createZRotate(double angle)
Definition Matrix3x3.cpp:52
static Matrix3x3 createYRotate(double angle)
Definition Matrix3x3.cpp:38
double getDeterminant() const
Definition Matrix3x3.cpp:224
const double & operator()(unsigned short row, unsigned short col) const
Definition Matrix3x3.h:131
bool operator==(const Matrix3x3 &ref) const
Definition Matrix3x3.cpp:148
Matrix3x3()
Definition Matrix3x3.cpp:114
std::shared_ptr< Matrix3x3 > Shared
Shared pointer.
Definition Matrix3x3.h:28
static Matrix3x3 createXRotate(double angle)
Definition Matrix3x3.cpp:24
bool operator!=(const Matrix3x3 &ref) const
Definition Matrix3x3.cpp:166
Matrix3x3 & operator*=(const Matrix3x3 &ref)
const row_t & operator[](unsigned short index) const
Definition Matrix3x3.h:118