Struct Matrix3x3
Defined in File matrix3x3.h
Struct Documentation
-
struct Matrix3x3
Public Functions
-
inline void SetIJ(int i, int j, double value)
Set value at row i and column j.
-
inline void AddIJ(int i, int j, double value)
Add value to value at row i and column j.
-
inline double GetIJ(int i, int j) const
Obtain a copy of the value at row i and column j.
-
inline void SetDiagonalVec(double a00, double a11, double a22)
Sets the diagonal of the matrix.
-
inline double Det(int row = 0) const
Get the determinant using specified row [default:0].
-
inline double MinorIJ(int ir, int jr) const
Get the minor value associated with row ir and column jr.
-
inline std::string PrintStr() const
Print the matrix as a string.
Public Members
Public Static Functions
-
static inline Matrix3x3 MakeRotationMatrixFromVector(const Vector3 &vec)
Produces a rotation matrix with a reference vector rotated from the cartesian basis vectors \(\hat{i}\), \(\hat{j}\) and \(\hat{k}\).
By default a rotation matrix that creates no rotation is the identity matrix. Such a matrix can be defined from basis vectors following the notion that the “up-vector” is \(\hat{k}\), this is also called the normal vector \(\hat{n}\). The tangent vector is \(\hat{i}\), denoted with \(\hat{t}\). And the bi-norm vector is \(\hat{j}\), denoted with \(\hat{b}\).
By specifying only the normal vector we can compute a simple pitch based rotation matrix. The supplied vector is therefore the new normal-vector, the tangent vector is computed as \( \hat{t} = \hat{n} \times \hat{k} \), and the bi-norm vector is computed as \( \hat{b} = \hat{n} \times \hat{t} \)
-
inline void SetIJ(int i, int j, double value)