vmmlib
1.10.0
Templatized C++ vector and matrix math library
|
Public Member Functions | |
matrix () | |
Construct a zero-initialized matrix. More... | |
matrix (const T *begin, const T *end) | |
Construct a matrix with default values. More... | |
template<size_t P, size_t Q, typename U > | |
matrix (const matrix< P, Q, U > &source_) | |
template<size_t O> | |
matrix (const quaternion< T > &rotation, const vector< O, T > &translation, typename enable_if< M==O+1 &&N==O+1 &&O==3 >::type *=0) | |
Construct a new transformation matrix from a rotation quaternion and a translation vector. | |
template<size_t O> | |
matrix (const vector< O, T > &eye, const vector< O, T > &lookat, const vector< O, T > &up, typename enable_if< M==O+1 &&N==O+1 &&O==3 >::type *=0) | |
Construct a new transformation matrix from an eye position, lookat position and up vector, following convention from gluLookAt(). | |
T & | operator() (size_t row_index, size_t col_index) |
const T & | operator() (size_t row_index, size_t col_index) const |
T & | at (size_t row_index, size_t col_index) |
const T & | at (size_t row_index, size_t col_index) const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
operator T * () | |
operator const T * () const | |
bool | operator== (const matrix &other) const |
bool | operator!= (const matrix &other) const |
bool | equals (const matrix &other, T tolerance=std::numeric_limits< T >::epsilon()) const |
void | multiply_piecewise (const matrix &other) |
template<size_t P> | |
void | multiply (const matrix< M, P, T > &left, const matrix< P, N, T > &right) |
template<size_t U, size_t V> | |
void | convolve (const matrix< U, V, T > &kernel) |
template<size_t P> | |
matrix< M, P, T > | operator* (const matrix< N, P, T > &other) const |
template<size_t O, size_t P, typename TT > | |
enable_if< M==N &&O==P &&M==O, TT >::type * | operator*= (const matrix< O, P, TT > &right) |
matrix | operator+ (const matrix &other) const |
matrix | operator- (const matrix &other) const |
void | operator+= (const matrix &other) |
void | operator-= (const matrix &other) |
void | operator+= (T scalar) |
void | operator-= (T scalar) |
template<size_t O, size_t P, size_t Q, size_t R> | |
enable_if< M==O+Q &&N==P+R >::type * | direct_sum (const matrix< O, P, T > &m0, const matrix< Q, R, T > &m1) |
matrix | operator* (T scalar) |
void | operator*= (T scalar) |
matrix | operator/ (T scalar) |
void | operator/= (T scalar) |
vector< M, T > | operator* (const vector< N, T > &other) const |
template<size_t O> | |
vector< O, T > | operator* (const vector< O, T > &vector_) const |
matrix< M, N, T > | operator- () const |
matrix< M, N, T > | negate () const |
void | tensor (const vector< M, T > &u, const vector< N, T > &v) |
template<size_t uM, size_t vM> | |
enable_if< uM==3 &&vM==3 &&M==N &&M==4 >::type * | tensor (const vector< uM, T > &u, const vector< vM, T > &v) |
template<size_t O, size_t P> | |
matrix< O, P, T > | get_sub_matrix (size_t row_offset, size_t col_offset, typename enable_if< O<=M &&P<=N >::type *=0) const |
template<size_t O, size_t P, typename TT > | |
enable_if< M==N &&O==P &&M==O, TT >::type * | operator*= (const matrix< O, P, TT > &right) |
template<size_t uM, size_t vM> | |
enable_if< uM==3 &&vM==3 &&M==N &&M==4 >::type * | tensor (const vector< uM, T > &u, const vector< vM, T > &v) |
template<size_t O, size_t P, size_t Q, size_t R> | |
enable_if< M==O+Q &&N==P+R >::type * | direct_sum (const matrix< O, P, T > &upper_left, const matrix< Q, R, T > &lower_right) |
Static Public Attributes | |
static const size_t | ROWS = M |
static const size_t | COLS = N |
Definition at line 54 of file matrix.hpp.
vmml::matrix< M, N, T >::matrix | ( | ) |
Construct a zero-initialized matrix.
Square matrices are initialized as identity
Definition at line 823 of file matrix.hpp.
vmml::matrix< M, N, T >::matrix | ( | const T * | begin, |
const T * | end | ||
) |
Construct a matrix with default values.
Missing data is zero-initialized.
Definition at line 832 of file matrix.hpp.