Matrix 3x3. More...
Public Member Functions | |
| matrix3 () | |
| empty constructor (identity) More... | |
| matrix3 (float x00, float x01, float x02, float x10, float x11, float x12, float x20, float x21, float x22) | |
| direct constructor with every value More... | |
| float | operator() (const size_t &k1, const size_t &k2) const |
| Access to the k_th entry (k in [0,2]) More... | |
| float & | operator() (const size_t &k1, const size_t &k2) |
| Access to the k_th entry (k in [0,2]) More... | |
| const float * | pointer () const |
| fast pointer access More... | |
| float * | pointer_unprotected () |
| fast pointer access More... | |
| matrix3 | operator+ (const matrix3 &m2) const |
| |
| matrix3 | operator+ (float s) const |
| |
| matrix3 | operator- (const matrix3 &m2) const |
| |
| matrix3 | operator- (float s) const |
| |
| matrix3 | operator* (float s) const |
| multiply by a scalar operator More... | |
| vec3 | operator* (const vec3 &v) const |
| multiply matrix with a v3 More... | |
| matrix3 | operator* (const matrix3 &m2) const |
| matrix mulitplication More... | |
| matrix3 | operator/ (float s) const |
| divide by a scalar operator More... | |
| matrix3 & | operator+= (const matrix3 &m) |
| internal + More... | |
| matrix3 & | operator+= (float s) |
| internal + More... | |
| matrix3 & | operator-= (const matrix3 &m) |
| internal - More... | |
| matrix3 & | operator-= (float s) |
| internal - More... | |
| matrix3 & | operator*= (float s) |
| internal * More... | |
| matrix3 & | operator/= (float s) |
| internal / More... | |
| matrix3 | operator- () const |
| unary negation More... | |
| matrix3 | product_compontentwise (const matrix3 &m) const |
| does componentwise multiplication More... | |
| matrix3 & | product_compontentwise_internal (const matrix3 &m) |
| does componentwise multiplication More... | |
| matrix3 | transposed () const |
| transpose matrix More... | |
| std::vector< float > | to_vector () const |
| convert 3x3 matrix into a vector of float of size 9 More... | |
Static Public Member Functions | |
| static matrix3 | identity () |
| build identity matrix More... | |
| static matrix3 | zeros () |
| build zero matrix More... | |
| static matrix3 | rotation (const vec3 &axis, float angle) |
| build rotation matrix More... | |
| static matrix3 | scale (float s) |
| build scaling matrix More... | |
| static matrix3 | scale (float s_x, float s_y, float s_z) |
| build scaling matrix More... | |
Private Member Functions | |
| void | assert_size (const size_t &k1, const size_t &k2) const |
| assert that a size_t belongs to [[0,2]] More... | |
Private Attributes | |
| float | m [9] |
| internal storage of the matrix More... | |
Matrix 3x3.
| cpe::matrix3::matrix3 | ( | ) |
empty constructor (identity)
References m.
Referenced by identity(), operator-(), operator/(), product_compontentwise(), rotation(), scale(), transposed(), and zeros().
| cpe::matrix3::matrix3 | ( | float | x00, |
| float | x01, | ||
| float | x02, | ||
| float | x10, | ||
| float | x11, | ||
| float | x12, | ||
| float | x20, | ||
| float | x21, | ||
| float | x22 | ||
| ) |
direct constructor with every value
References m.
|
private |
assert that a size_t belongs to [[0,2]]
Referenced by operator()().
|
static |
| float cpe::matrix3::operator() | ( | const size_t & | k1, |
| const size_t & | k2 | ||
| ) | const |
Access to the k_th entry (k in [0,2])
References assert_size(), and m.
Here is the call graph for this function:| float & cpe::matrix3::operator() | ( | const size_t & | k1, |
| const size_t & | k2 | ||
| ) |
Access to the k_th entry (k in [0,2])
References assert_size(), and m.
Here is the call graph for this function:| matrix3 cpe::matrix3::operator* | ( | float | s | ) | const |
multiply by a scalar operator
multiply matrix with a v3
References m, cpe::vec3::x(), cpe::vec3::y(), and cpe::vec3::z().
Here is the call graph for this function:matrix mulitplication
References m, pointer_unprotected(), and zeros().
Here is the call graph for this function:| matrix3 cpe::matrix3::operator+ | ( | float | s | ) | const |
| matrix3 cpe::matrix3::operator- | ( | float | s | ) | const |
| matrix3 cpe::matrix3::operator- | ( | ) | const |
| matrix3 cpe::matrix3::operator/ | ( | float | s | ) | const |
| const float * cpe::matrix3::pointer | ( | ) | const |
fast pointer access
References m.
Referenced by operator-(), cpe::operator-(), and cpe::operator<<().
| float * cpe::matrix3::pointer_unprotected | ( | ) |
does componentwise multiplication
References m.
build rotation matrix
References matrix3(), and cpe::vec3::normalized().
Here is the call graph for this function:
|
static |
|
static |
| std::vector< float > cpe::matrix3::to_vector | ( | ) | const |
convert 3x3 matrix into a vector of float of size 9
References m.
| matrix3 cpe::matrix3::transposed | ( | ) | const |
transpose matrix
Referenced by cpe::navigator_tool::camera_position(), glwidget::mouseMoveEvent(), and cpe::navigator_tool::ray_world_space_cam1().
Here is the call graph for this function:
|
static |
build zero matrix
References matrix3().
Referenced by operator*().
Here is the call graph for this function:
|
private |
internal storage of the matrix
Referenced by matrix3(), operator()(), operator*(), operator*=(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), pointer(), pointer_unprotected(), product_compontentwise(), product_compontentwise_internal(), to_vector(), and transposed().