class methods

- ofMatrix3x3()
- determinant()
- entrywiseTimes()
- inverse()
- invert()
- operator*()
- operator*=()
- operator+()
- operator+=()
- operator-()
- operator-=()
- operator/()
- operator/=()
- operator[]()
- set()
- transpose()

variables

The 3x3 matrix can hold the values needed to transform a 2d vertex, which is pretty handy when you want to do things like move vertices around, rotate them, etc. The 3x3 is pretty important because it allows you to have both a rotation and a transformation in the same little old object. You won't see them used a great deal because it's usually easier to use the rotate() and translate() methods of ofVec2f but they are handy sometimes. You'll probably see the ofMatrix4x4 used more often, because it allows you to represent a camera or a projection mathematically, and that's pretty useful in doing 3d graphics. They're also used in ofxOpenCv sometimes to represent information about cameras.

*Documentation from code comments*

*Documentation from code comments*

A 3x3 Matrix

The layout is like this:

```
[ a b c ]
[ d e f ]
[ g h i ]
```

# ofMatrix3x3(...)

ofMatrix3x3::ofMatrix3x3(float _a, float _b, float _c, float _d, float _e, float _f, float _g, float _h, float _i)

*Documentation from code comments*

*Documentation from code comments*

\name Constructor {

# entrywiseTimes(...)

ofMatrix3x3 ofMatrix3x3::entrywiseTimes(const ofMatrix3x3 &A)

*Documentation from code comments*

*Documentation from code comments*

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)

*Documentation from code comments*

*Documentation from code comments*

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();

# operator*(...)

ofMatrix3x3 ofMatrix3x3::operator*(const ofMatrix3x3 &B)

*Documentation from code comments*

*Documentation from code comments*

Multiply a 3x3 matrix with a 3x3 matrix

# operator*(...)

ofMatrix3x3 ofMatrix3x3::operator*(float scalar)

*Documentation from code comments*

*Documentation from code comments*

Multiply a matrix with a scalar

# operator*=(...)

void ofMatrix3x3::operator*=(const ofMatrix3x3 &B)

*Documentation from code comments*

*Documentation from code comments*

Multiply a matrix by a matrix this = this*B (in that order)

# operator*=(...)

void ofMatrix3x3::operator*=(float scalar)

*Documentation from code comments*

*Documentation from code comments*

Multiply a matrix by a scalar (multiples all entries by scalar)

# operator+(...)

ofMatrix3x3 ofMatrix3x3::operator+(const ofMatrix3x3 &B)

*Documentation from code comments*

*Documentation from code comments*

Add two matrices

# operator+=(...)

void ofMatrix3x3::operator+=(const ofMatrix3x3 &B)

*Documentation from code comments*

*Documentation from code comments*

Add matrix to existing matrix

# operator-(...)

ofMatrix3x3 ofMatrix3x3::operator-(const ofMatrix3x3 &B)

*Documentation from code comments*

*Documentation from code comments*

Subtract two matrices

# operator-=(...)

void ofMatrix3x3::operator-=(const ofMatrix3x3 &B)

*Documentation from code comments*

*Documentation from code comments*

Subtract matrix from existing matrix

# operator/(...)

ofMatrix3x3 ofMatrix3x3::operator/(float scalar)

*Documentation from code comments*

*Documentation from code comments*

Divide a matrix through a scalar

# set(...)

void ofMatrix3x3::set(float _a, float _b, float _c, float _d, float _e, float _f, float _g, float _h, float _i)

*Documentation from code comments*

*Documentation from code comments*

\name Matrix access {

# transpose()

void ofMatrix3x3::transpose()

*Documentation from code comments*

*Documentation from code comments*

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(...)

ofMatrix3x3 ofMatrix3x3::transpose(const ofMatrix3x3 &A)

*Documentation from code comments*

*Documentation from code comments*

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.

comments powered by Disqus

Wednesday, 20 January 2016 15:56:00 UTC
에 마지막으로 업데이트됨 -
9ba54b666a17893c3ab68788bb25ba822a1df5b1

hosting for openFrameworks.kr is provided by github.com

## comments

You can add comments with usage examples or other information for each class, method or variable, for adding documentation to an empty section or reporting errors is better to send a fix or open an issue through github.

When posting code enclose it in: