This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
A 3x3 Matrix. More...
#include <ofMatrix3x3.h>
Public Member Functions | |
Constructor | |
ofMatrix3x3 (float _a=0.0, float _b=0.0, float _c=0.0, float _d=0.0, float _e=0.0, float _f=0.0, float _g=0.0, float _h=0.0, float _i=0.0) | |
ofMatrix3x3 (const glm::mat3 &mat) | |
operator glm::mat3 () const | |
Matrix access | |
void | set (float _a, float _b, float _c, float _d, float _e, float _f, float _g, float _h, float _i) |
float & | operator[] (const int &index) |
Functions | |
void | transpose () |
Transpose the matrix. | |
ofMatrix3x3 | transpose (const ofMatrix3x3 &A) |
Transpose without changing the matrix. Uses the "swap" method with additions and subtractions to swap the elements that aren't on the main diagonal. | |
float | determinant () const |
Find the determinant of the matrix. | |
float | determinant (const ofMatrix3x3 &A) |
ofMatrix3x3 | inverse (const ofMatrix3x3 &A) |
Inverse of a 3x3 matrix. | |
void | invert () |
ofMatrix3x3 | entrywiseTimes (const ofMatrix3x3 &A) |
Multiply a matrix by a matrix entry by entry (i.e. a*a, b*b, c*c...) | |
Public Attributes | |
float | a |
float | b |
float | c |
float | d |
float | e |
float | f |
float | g |
float | h |
float | i |
Operators | |
ofMatrix3x3 | operator+ (const ofMatrix3x3 &B) |
Add two matrices. | |
void | operator+= (const ofMatrix3x3 &B) |
Add matrix to existing matrix. | |
ofMatrix3x3 | operator- (const ofMatrix3x3 &B) |
Subtract two matrices. | |
void | operator-= (const ofMatrix3x3 &B) |
Subtract matrix from existing matrix. | |
ofMatrix3x3 | operator* (float scalar) |
Multiply a matrix with a scalar | |
void | operator*= (const ofMatrix3x3 &B) |
Multiply a matrix by a matrix this = this*B (in that order) | |
void | operator*= (float scalar) |
Multiply a matrix by a scalar (multiples all entries by scalar) | |
ofMatrix3x3 | operator* (const ofMatrix3x3 &B) |
Multiply a 3x3 matrix with a 3x3 matrix | |
ofMatrix3x3 | operator/ (float scalar) |
Divide a matrix through a scalar | |
void | operator/= (const ofMatrix3x3 &B) |
void | operator/= (float scalar) |
std::ostream & | operator<< (std::ostream &os, const ofMatrix3x3 &M) |
std::istream & | operator>> (std::istream &is, ofMatrix3x3 &M) |
Detailed Description
A 3x3 Matrix.
The layout is like this:
[ a b c ] [ d e f ] [ g h i ]
Constructor & Destructor Documentation
◆ ofMatrix3x3() [1/2]
ofMatrix3x3::ofMatrix3x3 | ( | float | _a = 0.0 , |
float | _b = 0.0 , |
||
float | _c = 0.0 , |
||
float | _d = 0.0 , |
||
float | _e = 0.0 , |
||
float | _f = 0.0 , |
||
float | _g = 0.0 , |
||
float | _h = 0.0 , |
||
float | _i = 0.0 |
||
) |
◆ ofMatrix3x3() [2/2]
|
inline |
Member Function Documentation
◆ determinant() [1/2]
float ofMatrix3x3::determinant | ( | ) | const |
Find the determinant of the matrix.
- See also
- Wolfram explanation
◆ determinant() [2/2]
float ofMatrix3x3::determinant | ( | const ofMatrix3x3 & | A | ) |
◆ entrywiseTimes()
ofMatrix3x3 ofMatrix3x3::entrywiseTimes | ( | const ofMatrix3x3 & | A | ) |
Multiply a matrix by a matrix entry by entry (i.e. a*a, b*b, c*c...)
This is referred to as an entrywise, Hadamard, or Schur product.
◆ inverse()
ofMatrix3x3 ofMatrix3x3::inverse | ( | const ofMatrix3x3 & | A | ) |
Inverse of a 3x3 matrix.
the inverse is the adjoint divided through the determinant find the matrix of minors (minor = determinant of 2x2 matrix of the 2 rows/colums current element is NOT in) turn them in cofactors (= change some of the signs) find the adjoint by transposing the matrix of cofactors divide this through the determinant to get the inverse
- See also
- invert();
◆ invert()
void ofMatrix3x3::invert | ( | ) |
◆ operator glm::mat3()
|
inline |
◆ operator*() [1/2]
ofMatrix3x3 ofMatrix3x3::operator* | ( | const ofMatrix3x3 & | B | ) |
Multiply a 3x3 matrix with a 3x3 matrix
◆ operator*() [2/2]
ofMatrix3x3 ofMatrix3x3::operator* | ( | float | scalar | ) |
Multiply a matrix with a scalar
◆ operator*=() [1/2]
void ofMatrix3x3::operator*= | ( | const ofMatrix3x3 & | B | ) |
Multiply a matrix by a matrix this = this*B (in that order)
◆ operator*=() [2/2]
void ofMatrix3x3::operator*= | ( | float | scalar | ) |
Multiply a matrix by a scalar (multiples all entries by scalar)
◆ operator+()
ofMatrix3x3 ofMatrix3x3::operator+ | ( | const ofMatrix3x3 & | B | ) |
Add two matrices.
◆ operator+=()
void ofMatrix3x3::operator+= | ( | const ofMatrix3x3 & | B | ) |
Add matrix to existing matrix.
◆ operator-()
ofMatrix3x3 ofMatrix3x3::operator- | ( | const ofMatrix3x3 & | B | ) |
Subtract two matrices.
◆ operator-=()
void ofMatrix3x3::operator-= | ( | const ofMatrix3x3 & | B | ) |
Subtract matrix from existing matrix.
◆ operator/()
ofMatrix3x3 ofMatrix3x3::operator/ | ( | float | scalar | ) |
Divide a matrix through a scalar
◆ operator/=() [1/2]
void ofMatrix3x3::operator/= | ( | const ofMatrix3x3 & | B | ) |
◆ operator/=() [2/2]
void ofMatrix3x3::operator/= | ( | float | scalar | ) |
◆ operator[]()
float & ofMatrix3x3::operator[] | ( | const int & | index | ) |
◆ set()
void ofMatrix3x3::set | ( | float | _a, |
float | _b, | ||
float | _c, | ||
float | _d, | ||
float | _e, | ||
float | _f, | ||
float | _g, | ||
float | _h, | ||
float | _i | ||
) |
◆ transpose() [1/2]
void ofMatrix3x3::transpose | ( | ) |
Transpose the matrix.
This changes the matrix.
[ a b c ]T [ a d g ] [ d e f ] = [ b e h ] [ g h i ] [ c f i ]
◆ transpose() [2/2]
ofMatrix3x3 ofMatrix3x3::transpose | ( | const ofMatrix3x3 & | A | ) |
Transpose without changing the matrix. Uses the "swap" method with additions and subtractions to swap the elements that aren't on the main diagonal.
- Returns
- transposed matrix.
Friends And Related Symbol Documentation
◆ operator<<
|
friend |
◆ operator>>
|
friend |
Member Data Documentation
◆ a
float ofMatrix3x3::a |
◆ b
float ofMatrix3x3::b |
◆ c
float ofMatrix3x3::c |
◆ d
float ofMatrix3x3::d |
◆ e
float ofMatrix3x3::e |
◆ f
float ofMatrix3x3::f |
◆ g
float ofMatrix3x3::g |
◆ h
float ofMatrix3x3::h |
◆ i
float ofMatrix3x3::i |
The documentation for this class was generated from the following files:
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/math/ofMatrix3x3.h
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/math/ofMatrix3x3.cpp