![]() |
VectorNav C++ Library
|
3x3 matrix specialization. More...
#include <matrix.h>
Public Member Functions | |
mat () | |
Creates a new matrix with uninitialized elements. | |
mat (T val) | |
Creates a new matrix with its elements initialized to val. More... | |
mat (T e00v, T e01v, T e02v, T e10v, T e11v, T e12v, T e20v, T e21v, T e22v) | |
Creates a new matrix with its components intialized to the provided values. More... | |
mat (vec< 3, T > col0, vec< 3, T > col1, vec< 3, T > col2) | |
Constructs a matrix from 3 column vectors. Vectors are stored in column order. More... | |
T & | operator() (size_t row, size_t col) |
Indexing into the matrix's elements. More... | |
const T & | operator() (size_t row, size_t col) const |
Indexing into the matrix's elements. More... | |
mat | operator- () const |
Negates the matrix. More... | |
template<typename S > | |
mat & | operator*= (const S &rhs) |
Multiplies the matrix by a scalar. More... | |
template<typename S > | |
mat & | operator*= (const mat< 3, 3, S > &rhs) |
Multiplies the matrix by another matrix. More... | |
template<typename S > | |
mat & | operator/= (const S &rhs) |
Divides the matrix by a scalar. More... | |
template<typename S > | |
mat & | operator+= (const mat< 3, 3, S > &rhs) |
Adds a matrix to this matrix. More... | |
template<typename S > | |
mat & | operator-= (const mat< 3, 3, S > &rhs) |
Subtracts a matrix from this matrix. More... | |
size_t | dimRow () const |
The matrix's row dimension. More... | |
size_t | dimCol () const |
The matrix's column dimension. More... | |
size_t | dimCols () const |
template<typename S > | |
void | copy (const mat< 3, 3, S > &rhs) |
mat | neg () const |
Negates the matrix. More... | |
mat | mult (const double &scalar) const |
Multiplies the matrix by a scalar. More... | |
mat | div (const double &scalar) const |
Divides the matrix by a scalar. More... | |
mat | add (const mat &toAdd) const |
Adds a matrix to this matrix. More... | |
mat | sub (const mat &toSub) const |
Subtracts a matrix from this matrix. More... | |
mat< 3, 3, T > | transpose () const |
Transposes the matrix. More... | |
Static Public Member Functions | |
static mat | zero () |
Matrix with all of its elements set to 0. More... | |
static mat | one () |
Matrix with all of its elements set to 1. More... | |
static mat< 3, 3, T > | identity () |
Identity matrix with its diagonal elements set to 1. More... | |
Public Attributes | |
union vn::math::mat< 3, 3, T >:: { ... } | |
T | e00 |
Element 0,0. | |
T | e10 |
Element 1,0. | |
T | e20 |
Element 2,0. | |
T | e01 |
Element 0,1. | |
T | e11 |
Element 1,1. | |
T | e21 |
Element 2,1. | |
T | e02 |
Element 0,2. | |
T | e12 |
Element 1,2. | |
T | e22 |
Element 2,2. | |
T | e [3 *3] |
The matrix's elements. | |
3x3 matrix specialization.
matrix is column ordered in memory
|
inlineexplicit |
Creates a new matrix with its elements initialized to val.
[in] | val | The initialization value. |
|
inline |
Creates a new matrix with its components intialized to the provided values.
[in] | e00v | Element 0,0 value. |
[in] | e01v | Element 0,1 value. |
[in] | e02v | Element 0,2 value. |
[in] | e10v | Element 1,0 value. |
[in] | e11v | Element 1,1 value. |
[in] | e12v | Element 1,2 value. |
[in] | e20v | Element 2,0 value. |
[in] | e21v | Element 2,1 value. |
[in] | e22v | Element 2,2 value. |
|
inline |
Constructs a matrix from 3 column vectors. Vectors are stored in column order.
[in] | col0 | The 0 column vector. |
[in] | col1 | The 1 column vector. |
[in] | col2 | The 2 column vector. |
|
inline |
Adds a matrix to this matrix.
[in] | toAdd | The matrix to add. |
|
inline |
The matrix's column dimension.
|
inline |
The matrix's row dimension.
|
inline |
Divides the matrix by a scalar.
[in] | scalar | The scalar value. |
|
inlinestatic |
Identity matrix with its diagonal elements set to 1.
|
inline |
Multiplies the matrix by a scalar.
[in] | scalar | The scalar value. |
|
inline |
Negates the matrix.
|
inlinestatic |
Matrix with all of its elements set to 1.
|
inline |
Indexing into the matrix's elements.
[in] | row | The 0-based index row. |
[in] | col | The 0-based index column. |
|
inline |
Indexing into the matrix's elements.
[in] | row | The 0-based index row. |
[in] | col | The 0-based index column. |
|
inline |
Multiplies the matrix by a scalar.
[in] | rhs | The scalar. |
|
inline |
Multiplies the matrix by another matrix.
[in] | rhs | The other matrix. |
|
inline |
Adds a matrix to this matrix.
[in] | rhs | The right-side vector. |
|
inline |
Negates the matrix.
|
inline |
Subtracts a matrix from this matrix.
[in] | rhs | The right-side matrix. |
|
inline |
Divides the matrix by a scalar.
[in] | rhs | The scalar. |
|
inline |
Subtracts a matrix from this matrix.
[in] | toSub | The matrix to subtract from this. |
|
inline |
Transposes the matrix.
|
inlinestatic |
Matrix with all of its elements set to 0.