6#ifndef ACTIVE_GEOMETRY_MATRIX_4x4
7#define ACTIVE_GEOMETRY_MATRIX_4x4
9#include "Active/Geometry/Matrix3x3.h"
20 using row_t = std::array<double, 4>;
22 using base_t = std::array<row_t, 4>;
24 using Unique = std::unique_ptr<Matrix4x4>;
26 using Shared = std::shared_ptr<Matrix4x4>;
28 using Option = std::optional<Matrix4x4>;
81 Matrix4x4(
double a1,
double b1,
double c1,
double d1,
82 double a2,
double b2,
double c2,
double d2,
83 double a3,
double b3,
double c3,
double d3,
84 double a4,
double b4,
double c4,
double d4);
123 row_t
operator[](
unsigned short index) {
return m_matrix[index]; }
130 double&
operator()(
unsigned short row,
unsigned short col) {
return m_matrix[row][col]; }
137 const double&
operator()(
unsigned short row,
unsigned short col)
const {
return m_matrix[row][col]; }
A 3x3 matrix class.
Definition Matrix3x3.h:16
A 4x4 matrix class.
Definition Matrix4x4.h:14
static Matrix4x4 createXRotate(const double &angle)
Definition Matrix4x4.cpp:24
std::optional< Matrix4x4 > Option
Optional.
Definition Matrix4x4.h:28
static Matrix4x4 createScale(const double &x, const double &y, const double &z)
Definition Matrix4x4.cpp:71
Matrix4x4 operator*(const Matrix4x4 &ref) const
Definition Matrix4x4.cpp:217
double getDeterminant() const
Definition Matrix4x4.cpp:271
static Matrix4x4 createZRotate(const double &angle)
Definition Matrix4x4.cpp:54
row_t operator[](unsigned short index)
Definition Matrix4x4.h:123
Matrix4x4 & operator*=(const Matrix4x4 &ref)
Definition Matrix4x4.cpp:238
static Matrix4x4 createIdentity()
Definition Matrix4x4.cpp:108
Matrix4x4()
Definition Matrix4x4.cpp:122
std::shared_ptr< Matrix4x4 > Shared
Shared pointer.
Definition Matrix4x4.h:26
Matrix3x3 getSubmatrix(unsigned short row, unsigned short col) const
Definition Matrix4x4.cpp:289
static Matrix4x4 createYRotate(const double &angle)
Definition Matrix4x4.cpp:39
std::unique_ptr< Matrix4x4 > Unique
Unique pointer.
Definition Matrix4x4.h:24
const double & operator()(unsigned short row, unsigned short col) const
Definition Matrix4x4.h:137
bool operator==(const Matrix4x4 &ref) const
Definition Matrix4x4.cpp:187
double & operator()(unsigned short row, unsigned short col)
Definition Matrix4x4.h:130
Matrix4x4 & operator=(const Matrix4x4 &source)
Definition Matrix4x4.cpp:169
Matrix4x4 getInverse() const
Definition Matrix4x4.cpp:250
static Matrix4x4 createTranslate(const double &x, const double &y, const double &z)
Definition Matrix4x4.cpp:90
bool operator!=(const Matrix4x4 &ref) const
Definition Matrix4x4.cpp:205