|
| Mat3 ()=default |
| Trivial constructor, the matrix is NOT initialized. More...
|
|
| Mat3 (const Quat< T > &q) |
|
template<typename Source > |
| Mat3 (Source a, Source b, Source c, Source d, Source e, Source f, Source g, Source h, Source i) |
| Constructor given array of elements, the ordering is in row major form: More...
|
|
template<typename Source > |
| Mat3 (const Vec3< Source > &v1, const Vec3< Source > &v2, const Vec3< Source > &v3, bool rows=true) |
|
template<typename Source > |
| Mat3 (Source *a) |
|
template<typename Source > |
| Mat3 (const Mat3< Source > &m) |
| Conversion constructor. More...
|
|
| Mat3 (const Mat4< T > &m) |
| Conversion from Mat4 (copies top left) More...
|
|
void | setRow (int i, const Vec3< T > &v) |
| Set ith row to vector v. More...
|
|
Vec3< T > | row (int i) const |
| Get ith row, e.g. Vec3d v = m.row(1);. More...
|
|
void | setCol (int j, const Vec3< T > &v) |
| Set jth column to vector v. More...
|
|
Vec3< T > | col (int j) const |
| Get jth column, e.g. Vec3d v = m.col(0);. More...
|
|
T & | operator() (int i, int j) |
|
T | operator() (int i, int j) const |
|
void | setRows (const Vec3< T > &v1, const Vec3< T > &v2, const Vec3< T > &v3) |
| Set the rows of this matrix to the vectors v1, v2, v3. More...
|
|
void | setColumns (const Vec3< T > &v1, const Vec3< T > &v2, const Vec3< T > &v3) |
| Set the columns of this matrix to the vectors v1, v2, v3. More...
|
|
void | setSymmetric (const Vec3< T > &vdiag, const Vec3< T > &vtri) |
| Set diagonal and symmetric triangular components. More...
|
|
void | setSkew (const Vec3< T > &v) |
| Set the matrix as cross product of the given vector. More...
|
|
void | setToRotation (const Quat< T > &q) |
| Set this matrix to the rotation matrix specified by the quaternion. More...
|
|
void | setToRotation (const Vec3< T > &axis, T angle) |
| Set this matrix to the rotation specified by axis and angle. More...
|
|
void | setZero () |
| Set this matrix to zero. More...
|
|
void | setIdentity () |
| Set this matrix to identity. More...
|
|
template<typename Source > |
const Mat3 & | operator= (const Mat3< Source > &m) |
| Assignment operator. More...
|
|
bool | eq (const Mat3 &m, T eps=1.0e-8) const |
| Return true if this matrix is equivalent to m within a tolerance of eps. More...
|
|
Mat3< T > | operator- () const |
| Negation operator, for e.g. m1 = -m2;. More...
|
|
template<typename S > |
const Mat3< T > & | operator*= (S scalar) |
| Multiplication operator, e.g. M = scalar * M;. More...
|
|
template<typename S > |
const Mat3< T > & | operator+= (const Mat3< S > &m1) |
| Add each element of the given matrix to the corresponding element of this matrix. More...
|
|
template<typename S > |
const Mat3< T > & | operator-= (const Mat3< S > &m1) |
| Subtract each element of the given matrix from the corresponding element of this matrix. More...
|
|
template<typename S > |
const Mat3< T > & | operator*= (const Mat3< S > &m1) |
| Multiply this matrix by the given matrix. More...
|
|
Mat3 | cofactor () const |
| Return the cofactor matrix of this matrix. More...
|
|
Mat3 | adjoint () const |
| Return the adjoint of this matrix, i.e., the transpose of its cofactor. More...
|
|
Mat3 | transpose () const |
| returns transpose of this More...
|
|
Mat3 | inverse (T tolerance=0) const |
|
T | det () const |
| Determinant of matrix. More...
|
|
T | trace () const |
| Trace of matrix. More...
|
|
Mat3 | snapBasis (Axis axis, const Vec3< T > &direction) |
|
template<typename T0 > |
Vec3< T0 > | transform (const Vec3< T0 > &v) const |
|
template<typename T0 > |
Vec3< T0 > | pretransform (const Vec3< T0 > &v) const |
|
Mat3 | timesDiagonal (const Vec3< T > &diag) const |
| Treat diag as a diagonal matrix and return the product of this matrix with diag (from the right). More...
|
|
std::string | str (unsigned indentation=0) const |
|
T * | asPointer () |
| Direct access to the internal data. More...
|
|
const T * | asPointer () const |
|
void | write (std::ostream &os) const |
|
void | read (std::istream &is) |
|
T | absMax () const |
| Return the maximum of the absolute of all elements in this matrix. More...
|
|
bool | isNan () const |
| True if a Nan is present in this matrix. More...
|
|
bool | isInfinite () const |
| True if an Inf is present in this matrix. More...
|
|
bool | isFinite () const |
| True if no Nan or Inf values are present. More...
|
|
bool | isZero () const |
| True if all elements are exactly zero. More...
|
|
|
T * | operator[] (int i) |
| Array style reference to ith row. More...
|
|
const T * | operator[] (int i) const |
| Array style reference to ith row. More...
|
|
|
(Note that these are not member functions.)
|
template<typename T0 , typename T1 > |
bool | operator== (const Mat3< T0 > &m0, const Mat3< T1 > &m1) |
| Equality operator, does exact floating point comparisons. More...
|
|
template<typename T0 , typename T1 > |
bool | operator!= (const Mat3< T0 > &m0, const Mat3< T1 > &m1) |
| Inequality operator, does exact floating point comparisons. More...
|
|
template<typename S , typename T > |
Mat3< typename promote< S, T >::type > | operator* (S scalar, const Mat3< T > &m) |
| Multiply each element of the given matrix by scalar and return the result. More...
|
|
template<typename S , typename T > |
Mat3< typename promote< S, T >::type > | operator* (const Mat3< T > &m, S scalar) |
| Multiply each element of the given matrix by scalar and return the result. More...
|
|
template<typename T0 , typename T1 > |
Mat3< typename promote< T0, T1 >::type > | operator+ (const Mat3< T0 > &m0, const Mat3< T1 > &m1) |
| Add corresponding elements of m0 and m1 and return the result. More...
|
|
template<typename T0 , typename T1 > |
Mat3< typename promote< T0, T1 >::type > | operator- (const Mat3< T0 > &m0, const Mat3< T1 > &m1) |
| Subtract corresponding elements of m0 and m1 and return the result. More...
|
|
template<typename T , typename MT > |
Vec3< typename promote< T, MT >::type > | operator* (const Mat3< MT > &_m, const Vec3< T > &_v) |
| Multiply _m by _v and return the resulting vector. More...
|
|
template<typename T , typename MT > |
Vec3< typename promote< T, MT >::type > | operator* (const Vec3< T > &_v, const Mat3< MT > &_m) |
| Multiply _v by _m and return the resulting vector. More...
|
|
template<typename T , typename MT > |
Vec3< T > & | operator*= (Vec3< T > &_v, const Mat3< MT > &_m) |
| Multiply _v by _m and replace _v with the resulting vector. More...
|
|