Public Member Functions | |
matrix3 () | |
empty constructor (identity) | |
matrix3 (const double &x00, const double &x01, const double &x02, const double &x10, const double &x11, const double &x12, const double &x20, const double &x21, const double &x22) | |
direct constructor with every value | |
const double & | operator() (const size_t &k1, const size_t &k2) const |
Access to the k_th entry (k in [0,3]) | |
double & | operator() (const size_t &k1, const size_t &k2) |
Access to the k_th entry (k in [0,3]) | |
const double * | pointer () const |
fast pointer access | |
double * | pointer_unprotected () |
fast pointer access | |
matrix3 & | operator+= (const matrix3 &m) |
internal + | |
matrix3 & | operator+= (const double &s) |
internal + | |
matrix3 & | operator-= (const matrix3 &m) |
internal - | |
matrix3 & | operator-= (const double &s) |
internal - | |
matrix3 & | operator*= (const double &s) |
internal * | |
matrix3 & | operator/= (const double &s) |
internal / | |
matrix3 | operator- () const |
unary negation | |
matrix3 | product_compontentwise (const matrix3 &m) const |
does componentwise mutliplication | |
matrix3 & | product_compontentwise_internal (const matrix3 &m) |
does componentwise mutliplication | |
matrix3 | transposed () const |
transpose matrix | |
std::vector< double > | to_4d () const |
convert 3x3 matrix into a 4x4 vector of double (glMultmatrixf) | |
Static Public Member Functions | |
static matrix3 | identity () |
build identity matrix | |
static matrix3 | zeros () |
build zero matrix | |
static matrix3 | rotation (const v3 &axis, const double &angle) |
build rotation matrix | |
static matrix3 | scale (const double &s) |
build scaling matrix | |
static matrix3 | scale (const double &s_x, const double &s_y, const double &s_z) |
build scaling matrix | |
Private Member Functions | |
void | assert_size (const size_t &k1, const size_t &k2) const throw (std::exception) |
assert that a size_t belongs to [[0,3]] | |
Private Attributes | |
double | m [9] |
internal storage of the matrix | |
Friends | |
matrix3 | operator+ (const matrix3 &m1, const matrix3 &m2) |
+ operator | |
matrix3 | operator+ (const double &s, const matrix3 &m) |
+ operator | |
matrix3 | operator+ (const matrix3 &m, const double &s) |
+ operator | |
matrix3 | operator- (const matrix3 &m1, const matrix3 &m2) |
| |
matrix3 | operator- (const double &s, const matrix3 &m) |
| |
matrix3 | operator- (const matrix3 &m, const double &s) |
| |
matrix3 | operator* (const double &s, const matrix3 &m) |
multiply by a scalar operator | |
matrix3 | operator* (const matrix3 &m, const double &s) |
multiply by a scalar operator | |
v3 | operator* (const matrix3 &m, const v3 &v) |
multiply matrix with a v3 | |
matrix3 | operator* (const matrix3 &m1, const matrix3 &m2) |
matrix mulitplication | |
matrix3 | operator/ (const matrix3 &m, const double &s) |
divide by a scalar operator | |
std::ostream & | operator<< (std::ostream &stream, const matrix3 &m) |
output the vector in ostream |
cpe::matrix3::matrix3 | ( | ) |
empty constructor (identity)
References m.
Referenced by identity(), operator-(), product_compontentwise(), rotation(), scale(), transposed(), and zeros().
cpe::matrix3::matrix3 | ( | const double & | x00, |
const double & | x01, | ||
const double & | x02, | ||
const double & | x10, | ||
const double & | x11, | ||
const double & | x12, | ||
const double & | x20, | ||
const double & | x21, | ||
const double & | x22 | ||
) |
direct constructor with every value
References m.
void cpe::matrix3::assert_size | ( | const size_t & | k1, |
const size_t & | k2 | ||
) | const throw (std::exception) [private] |
assert that a size_t belongs to [[0,3]]
References cpe::string_converter::to_string().
Referenced by operator()().
matrix3 cpe::matrix3::identity | ( | ) | [static] |
const double & cpe::matrix3::operator() | ( | const size_t & | k1, |
const size_t & | k2 | ||
) | const |
Access to the k_th entry (k in [0,3])
References assert_size(), and m.
double & cpe::matrix3::operator() | ( | const size_t & | k1, |
const size_t & | k2 | ||
) |
Access to the k_th entry (k in [0,3])
References assert_size(), and m.
matrix3 cpe::matrix3::operator- | ( | ) | const |
const double * cpe::matrix3::pointer | ( | ) | const |
double * cpe::matrix3::pointer_unprotected | ( | ) |
build rotation matrix
References matrix3(), and cpe::v3::normalized().
matrix3 cpe::matrix3::scale | ( | const double & | s_x, |
const double & | s_y, | ||
const double & | s_z | ||
) | [static] |
matrix3 cpe::matrix3::scale | ( | const double & | s | ) | [static] |
std::vector< double > cpe::matrix3::to_4d | ( | ) | const |
convert 3x3 matrix into a 4x4 vector of double (glMultmatrixf)
References m.
matrix3 cpe::matrix3::transposed | ( | ) | const |
matrix3 cpe::matrix3::zeros | ( | ) | [static] |
build zero matrix
References matrix3().
Referenced by cpe::operator*().
std::ostream& operator<< | ( | std::ostream & | stream, |
const matrix3 & | m | ||
) | [friend] |
output the vector in ostream
double cpe::matrix3::m[9] [private] |
internal storage of the matrix
Referenced by matrix3(), operator()(), cpe::operator*(), operator*=(), cpe::operator+(), operator+=(), operator-(), cpe::operator-(), operator-=(), cpe::operator/(), operator/=(), cpe::operator<<(), pointer(), pointer_unprotected(), product_compontentwise(), product_compontentwise_internal(), to_4d(), and transposed().