#include <rtcSMat2.h>
Public Member Functions | |
T | det () const |
int | invert () |
SMat2< T > | inverted () const |
void | set (const T x11, const T x12, const T x21, const T x22) |
void | setCols (const Vec2< T > &v0, const Vec2< T > &v1) |
void | setRows (const Vec2< T > &v0, const Vec2< T > &v1) |
SMat2 () | |
SMat2 (const T *d) | |
SMat2 (const T diagVal) | |
SMat2 (const Vec2< T > &diagVec) | |
SMat2 (const Mat< T, 2, 2 > &m) | |
SMat2 (const T x11, const T x12, const T x21, const T x22) | |
SMat2 (const Vec2< T > &q0, const Vec2< T > &q1) | |
template<class U > | |
SMat2 (const Mat< U, 2, 2 > &m) | |
Static Public Member Functions | |
static SMat2< T > | fromCols (const Vec2< T > &v0, const Vec2< T > &v1) |
static SMat2< T > | fromRows (const Vec2< T > &v0, const Vec2< T > &v1) |
A 2x2 matrix. A specialization of a square matrix.
Definition at line 40 of file rtcSMat2.h.
rtc::SMat2< T >::SMat2 | ( | ) | [inline] |
Ctor that doesn't initialize anything.
Definition at line 91 of file rtcSMat2.h.
rtc::SMat2< T >::SMat2 | ( | const T * | d | ) | [inline] |
Ctor that initializes from an array.
d | the (row major) data array of length 4 |
Definition at line 97 of file rtcSMat2.h.
rtc::SMat2< T >::SMat2 | ( | const T | diagVal | ) | [inline] |
Ctor that makes a multiple of the identity matrix.
diagVal | the value to which all diagonal entries will be set |
Definition at line 103 of file rtcSMat2.h.
rtc::SMat2< T >::SMat2 | ( | const Vec2< T > & | diagVec | ) | [inline] |
Ctor that makes a (mostly) zero matrix with diagonal entries from vec.
diagVec | the vector of values that should appear on the diagonal |
Definition at line 109 of file rtcSMat2.h.
rtc::SMat2< T >::SMat2 | ( | const Mat< T, 2, 2 > & | m | ) | [inline] |
Ctor that initializes from a Mat<T,2,2>.
Definition at line 115 of file rtcSMat2.h.
rtc::SMat2< T >::SMat2 | ( | const T | x11, |
const T | x12, | ||
const T | x21, | ||
const T | x22 | ||
) | [inline] |
Ctor that initializes matrix entries directly.
Definition at line 120 of file rtcSMat2.h.
rtc::SMat2< T >::SMat2 | ( | const Vec2< T > & | v0, |
const Vec2< T > & | v1 | ||
) | [inline] |
Ctor that initializes matrix from col vectors.
Definition at line 128 of file rtcSMat2.h.
Casting Ctor that initializes from a Mat<U,2,2> with type cast
Definition at line 138 of file rtcSMat2.h.
T rtc::SMat2< T >::det | ( | ) | const [inline] |
Calculate the determinant.
Reimplemented from rtc::SMat< T, 2 >.
Definition at line 193 of file rtcSMat2.h.
SMat2< T > rtc::SMat2< T >::fromCols | ( | const Vec2< T > & | v0, |
const Vec2< T > & | v1 | ||
) | [inline, static] |
Construct matrix given the cols
Definition at line 154 of file rtcSMat2.h.
SMat2< T > rtc::SMat2< T >::fromRows | ( | const Vec2< T > & | v0, |
const Vec2< T > & | v1 | ||
) | [inline, static] |
Construct matrix given the rows
Definition at line 145 of file rtcSMat2.h.
int rtc::SMat2< T >::invert | ( | ) | [inline] |
Calculate the inverse in place.
Reimplemented from rtc::SMat< T, 2 >.
Definition at line 213 of file rtcSMat2.h.
SMat2< T > rtc::SMat2< T >::inverted | ( | ) | const [inline] |
Invert the matrix. (matrix set to its inverse)
domain_error | when matrix nearly singular |
Reimplemented from rtc::SMat< T, 2 >.
Definition at line 201 of file rtcSMat2.h.
void rtc::SMat2< T >::set | ( | const T | x11, |
const T | x12, | ||
const T | x21, | ||
const T | x22 | ||
) | [inline] |
Set the matrix entries directly.
Definition at line 166 of file rtcSMat2.h.
void rtc::SMat2< T >::setCols | ( | const Vec2< T > & | v0, |
const Vec2< T > & | v1 | ||
) | [inline] |
Set the columns of the matrix.
Definition at line 183 of file rtcSMat2.h.
void rtc::SMat2< T >::setRows | ( | const Vec2< T > & | v0, |
const Vec2< T > & | v1 | ||
) | [inline] |
Set the rows of the matrix.
Definition at line 175 of file rtcSMat2.h.