class Rivet::Matrix3
Rivet::Matrix3
Specialisation of MatrixN to aid 3 dimensional rotations.
#include <Matrix3.hh>
Inherits from Rivet::Matrix< 3 >
Protected Types
Name | |
---|---|
using Eigen::Matrix< double, N, N > | EMatrix |
Public Functions
Name | |
---|---|
Matrix3() =default | |
Matrix3(const Matrix< 3 > & m3) | |
Matrix3(const Vector3 & axis, const double angle) | |
Matrix3(const Vector3 & from, const Vector3 & to) | |
Matrix3 & | setAsRotation(const Vector3 & from, const Vector3 & to) |
Matrix & | set(const size_t i, const size_t j, const double value) |
double | get(const size_t i, const size_t j) const |
Vector< N > | getRow(const size_t row) const |
Matrix< N > & | setRow(const size_t row, const Vector< N > & r) |
Vector< N > | getColumn(const size_t col) const |
Matrix< N > & | setColumn(const size_t col, const Vector< N > & c) |
Matrix< N > | transpose() const |
Matrix< N > | inverse() const Calculate inverse. |
double | det() const Calculate determinant. |
double | trace() const Calculate trace. |
Matrix< N > | operator-() const Negate. |
constexpr size_t | size() const Get dimensionality. |
bool | isZero(double tolerance =1E-5) const Index-wise check for nullness, allowing for numerical precision. |
bool | isEqual(Matrix< N > other) const Check for index-wise equality, allowing for numerical precision. |
bool | isSymm() const Check for symmetry under transposition. |
bool | isDiag() const Check that all off-diagonal elements are zero, allowing for numerical precision. |
bool | operator==(const Matrix< N > & a) const |
bool | operator!=(const Matrix< N > & a) const |
Matrix< N > & | operator*=(const Matrix< N > & m) |
Matrix< N > & | operator*=(const double a) |
Matrix< N > & | operator/=(const double a) |
Matrix< N > & | operator+=(const Matrix< N > & m) |
Matrix< N > & | operator-=(const Matrix< N > & m) |
Matrix3 | mkXRotation(const double angle) |
Matrix3 | mkYRotation(const double angle) |
Matrix3 | mkZRotation(const double angle) |
Matrix< N > | mkZero() |
Matrix< N > | mkDiag(Vector< N > diag) |
Matrix< N > | mkIdentity() |
Additional inherited members
Public Functions inherited from Rivet::Matrix< 3 >
Name | |
---|---|
Matrix() | |
Matrix(const Matrix< N > & other) |
Friends inherited from Rivet::Matrix< 3 >
Name | |
---|---|
Matrix< M > | add(const Matrix< M > & , const Matrix< M > & ) |
Matrix< M > | multiply(const double , const Matrix< M > & ) |
Matrix< M > | multiply(const Matrix< M > & , const Matrix< M > & ) |
Vector< M > | multiply(const Matrix< M > & , const Vector< M > & ) |
Matrix< M > | divide(const Matrix< M > & , const double ) |
Protected Types Documentation
using EMatrix
using Rivet::Matrix< N >::EMatrix = Eigen::Matrix<double,N,N>;
Public Functions Documentation
function Matrix3
Matrix3() =default
function Matrix3
inline Matrix3(
const Matrix< 3 > & m3
)
function Matrix3
inline Matrix3(
const Vector3 & axis,
const double angle
)
function Matrix3
inline Matrix3(
const Vector3 & from,
const Vector3 & to
)
function setAsRotation
inline Matrix3 & setAsRotation(
const Vector3 & from,
const Vector3 & to
)
function set
inline Matrix & set(
const size_t i,
const size_t j,
const double value
)
function get
inline double get(
const size_t i,
const size_t j
) const
function getRow
inline Vector< N > getRow(
const size_t row
) const
function setRow
inline Matrix< N > & setRow(
const size_t row,
const Vector< N > & r
)
function getColumn
inline Vector< N > getColumn(
const size_t col
) const
function setColumn
inline Matrix< N > & setColumn(
const size_t col,
const Vector< N > & c
)
function transpose
inline Matrix< N > transpose() const
function inverse
inline Matrix< N > inverse() const
Calculate inverse.
function det
inline double det() const
Calculate determinant.
function trace
inline double trace() const
Calculate trace.
function operator-
inline Matrix< N > operator-() const
Negate.
function size
inline constexpr size_t size() const
Get dimensionality.
function isZero
inline bool isZero(
double tolerance =1E-5
) const
Index-wise check for nullness, allowing for numerical precision.
function isEqual
inline bool isEqual(
Matrix< N > other
) const
Check for index-wise equality, allowing for numerical precision.
function isSymm
inline bool isSymm() const
Check for symmetry under transposition.
function isDiag
inline bool isDiag() const
Check that all off-diagonal elements are zero, allowing for numerical precision.
function operator==
inline bool operator==(
const Matrix< N > & a
) const
function operator!=
inline bool operator!=(
const Matrix< N > & a
) const
function operator*=
inline Matrix< N > & operator*=(
const Matrix< N > & m
)
function operator*=
inline Matrix< N > & operator*=(
const double a
)
function operator/=
inline Matrix< N > & operator/=(
const double a
)
function operator+=
inline Matrix< N > & operator+=(
const Matrix< N > & m
)
function operator-=
inline Matrix< N > & operator-=(
const Matrix< N > & m
)
function mkXRotation
static inline Matrix3 mkXRotation(
const double angle
)
function mkYRotation
static inline Matrix3 mkYRotation(
const double angle
)
function mkZRotation
static inline Matrix3 mkZRotation(
const double angle
)
function mkZero
static inline Matrix< N > mkZero()
function mkDiag
static inline Matrix< N > mkDiag(
Vector< N > diag
)
function mkIdentity
static inline Matrix< N > mkIdentity()
Updated on 2022-08-07 at 20:17:17 +0100