Public Member Functions | |
| matrix4 () | |
| empty constructor (identity) | |
| matrix4 (const double &x00, const double &x01, const double &x02, const double &x03, const double &x10, const double &x11, const double &x12, const double &x13, const double &x20, const double &x21, const double &x22, const double &x23, const double &x30, const double &x31, const double &x32, const double &x33) | |
| 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 | |
| matrix4 & | operator+= (const matrix4 &m) |
| internal + | |
| matrix4 & | operator+= (const double &s) |
| internal + | |
| matrix4 & | operator-= (const matrix4 &m) |
| internal - | |
| matrix4 & | operator-= (const double &s) |
| internal - | |
| matrix4 & | operator*= (const double &s) |
| internal * | |
| matrix4 & | operator/= (const double &s) |
| internal / | |
| matrix4 | operator- () const |
| unary negation | |
| matrix4 | product_compontentwise (const matrix4 &m) const |
| does componentwise mutliplication | |
| matrix4 & | product_compontentwise_internal (const matrix4 &m) |
| does componentwise mutliplication | |
| double | scalar_product (const v4 &a, const v4 &b) const |
| does the product a^t M b, where (a,b) are v4 vectors | |
| matrix4 | transposed () const |
| transpose matrix | |
Static Public Member Functions | |
| static matrix4 | identity () |
| build identity matrix | |
| static matrix4 | zeros () |
| build zero matrix | |
| static matrix4 | rotation (const v3 &axis, const double &angle) |
| build rotation matrix | |
| static matrix4 | scale (const double &s) |
| build scaling matrix (3D scaling, not w) | |
| static matrix4 | scale (const double &s_x, const double &s_y, const double &s_z, const double &s_w) |
| 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 [16] |
| internal storage of the matrix | |
Friends | |
| matrix4 | operator+ (const matrix4 &m1, const matrix4 &m2) |
| + operator | |
| matrix4 | operator+ (const double &s, const matrix4 &m) |
| + operator | |
| matrix4 | operator+ (const matrix4 &m, const double &s) |
| + operator | |
| matrix4 | operator- (const matrix4 &m1, const matrix4 &m2) |
| |
| matrix4 | operator- (const double &s, const matrix4 &m) |
| |
| matrix4 | operator- (const matrix4 &m, const double &s) |
| |
| matrix4 | operator* (const double &s, const matrix4 &m) |
| multiply by a scalar operator | |
| matrix4 | operator* (const matrix4 &m, const double &s) |
| multiply by a scalar operator | |
| v4 | operator* (const matrix4 &m, const v4 &v) |
| multiply matrix with a v4 | |
| v4 | operator* (const v4 &v, const matrix4 &m) |
| multiply matrix with a v4 | |
| matrix4 | operator* (const matrix4 &m1, const matrix4 &m2) |
| matrix mulitplication | |
| matrix4 | operator/ (const matrix4 &m, const double &s) |
| divide by a scalar operator | |
| std::ostream & | operator<< (std::ostream &stream, const matrix4 &m) |
| output the vector in ostream | |
| cpe::matrix4::matrix4 | ( | ) |
empty constructor (identity)
References m.
Referenced by identity(), operator-(), product_compontentwise(), rotation(), scale(), transposed(), and zeros().
| cpe::matrix4::matrix4 | ( | const double & | x00, | |
| const double & | x01, | |||
| const double & | x02, | |||
| const double & | x03, | |||
| const double & | x10, | |||
| const double & | x11, | |||
| const double & | x12, | |||
| const double & | x13, | |||
| const double & | x20, | |||
| const double & | x21, | |||
| const double & | x22, | |||
| const double & | x23, | |||
| const double & | x30, | |||
| const double & | x31, | |||
| const double & | x32, | |||
| const double & | x33 | |||
| ) |
direct constructor with every value
References m.
| void cpe::matrix4::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()().

| matrix4 cpe::matrix4::identity | ( | ) | [static] |
| double & cpe::matrix4::operator() | ( | const size_t & | k1, | |
| const size_t & | k2 | |||
| ) |
Access to the k_th entry (k in [0,3]).
References assert_size(), and m.

| const double & cpe::matrix4::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.

| matrix4 cpe::matrix4::operator- | ( | ) | const |
| const double * cpe::matrix4::pointer | ( | ) | const |
| double * cpe::matrix4::pointer_unprotected | ( | ) |
build rotation matrix
References matrix4(), and cpe::v3::normalized().

does the product a^t M b, where (a,b) are v4 vectors
References cpe::v4::dot().

| matrix4 cpe::matrix4::scale | ( | const double & | s_x, | |
| const double & | s_y, | |||
| const double & | s_z, | |||
| const double & | s_w | |||
| ) | [static] |
| matrix4 cpe::matrix4::scale | ( | const double & | s | ) | [static] |
build scaling matrix (3D scaling, not w)
References matrix4().

| matrix4 cpe::matrix4::transposed | ( | ) | const |
| matrix4 cpe::matrix4::zeros | ( | ) | [static] |
build zero matrix
References matrix4().
Referenced by cpe::operator*().

| std::ostream& operator<< | ( | std::ostream & | stream, | |
| const matrix4 & | m | |||
| ) | [friend] |
output the vector in ostream
double cpe::matrix4::m[16] [private] |
internal storage of the matrix
Referenced by matrix4(), operator()(), cpe::operator*(), operator*=(), cpe::operator+(), operator+=(), operator-(), cpe::operator-(), operator-=(), cpe::operator/(), operator/=(), cpe::operator<<(), pointer(), pointer_unprotected(), product_compontentwise(), product_compontentwise_internal(), and transposed().
1.6.3