|
Brunot
|
#include <AffineMatrix.h>
Public Member Functions | |
| AffineMatrix ()=default | |
| AffineMatrix (const AffineMatrix &)=default | |
| AffineMatrix (const Eigen::Matrix4f &) | |
| auto | operator= (const AffineMatrix &) -> AffineMatrix &=default |
| ~AffineMatrix ()=default | |
| AffineMatrix (float x1, float x2, float y1, float y2) | |
| Creates a matrix with the following dimensions: [ x1 x2 0 0 ] [ y1 y2 0 0 ] [ 0 0 1 0 ] [ 0 0 0 1 ]. | |
| AffineMatrix (float x1, float x2, float x3, float x4, float y1, float y2, float y3, float y4, float z1, float z2, float z3, float z4, float w1, float w2, float w3, float w4) | |
| Creates a matrix with the following dimensions: [ x1 x2 x3 x4 ] [ y1 y2 y3 y4 ] [ z1 z2 z3 z4 ] [ w1 w2 w3 w4 ]. | |
| auto | operator*= (const AffineMatrix &Other) -> AffineMatrix & |
| NOTE: THIS FLIPS MULTIPLICATION ORDER SO THE MATRICES PROPERLY MULTIPLY e.g. | |
| auto | operator* (const AffineMatrix &Other) const -> AffineMatrix |
| NOTE: THIS MULTIPLIES MATRICES AS THEY ARE WRITTEN (UNLIKE *=) e.g. | |
| auto | identity () -> AffineMatrix & |
| Converts the current matrix into the identity matrix. | |
| auto | transpose () -> AffineMatrix & |
| Transposes the current matrix. | |
| auto | scale (float s) -> AffineMatrix & |
| auto | scale (float x, float y) -> AffineMatrix & |
| auto | scale (const Vector4D &vector) -> AffineMatrix & |
| auto | rotate (float angle) -> AffineMatrix & |
| auto | translate (float x, float y) -> AffineMatrix & |
| auto | translate (const Vector4D &vector) -> AffineMatrix & |
| auto | operator() (int row, int col) -> float & |
| auto | operator() (int row, int col) const -> float |
| auto | get (int row, int col) -> float & |
| auto | get (int row, int col) const -> float |
| auto | data () const -> const float * |
| auto | data () -> float * |
Private Attributes | |
| Eigen::Matrix4f | matrix |
Friends | |
| auto | operator* (float scalar, const AffineMatrix &matrix) ->AffineMatrix |
| scales every value of the matrix by a float | |
| auto | operator* (const AffineMatrix &matrix, float scalar) ->AffineMatrix |
| scales every value of the matrix by a float | |
| auto | operator*= (AffineMatrix &matrix, float scalar) ->AffineMatrix & |
| scales every value of the matrix by a float | |
| auto | operator* (const AffineMatrix &rhs, const Vector4D &lhs) ->Vector4D |
| matrix times vector. | |
| auto | operator*= (Vector4D &rhs, const AffineMatrix &lhs) ->Vector4D & |
| applies a transformation to a vector. | |
|
default |
|
default |
| AffineMatrix::AffineMatrix | ( | const Eigen::Matrix4f & | rhs | ) |
|
default |
| AffineMatrix::AffineMatrix | ( | float | x1, |
| float | x2, | ||
| float | y1, | ||
| float | y2 ) |
Creates a matrix with the following dimensions: [ x1 x2 0 0 ] [ y1 y2 0 0 ] [ 0 0 1 0 ] [ 0 0 0 1 ].
| x1 | |
| x2 | |
| y1 | |
| y2 |
| AffineMatrix::AffineMatrix | ( | float | x1, |
| float | x2, | ||
| float | x3, | ||
| float | x4, | ||
| float | y1, | ||
| float | y2, | ||
| float | y3, | ||
| float | y4, | ||
| float | z1, | ||
| float | z2, | ||
| float | z3, | ||
| float | z4, | ||
| float | w1, | ||
| float | w2, | ||
| float | w3, | ||
| float | w4 ) |
Creates a matrix with the following dimensions: [ x1 x2 x3 x4 ] [ y1 y2 y3 y4 ] [ z1 z2 z3 z4 ] [ w1 w2 w3 w4 ].
| x1 | |
| x2 | |
| x3 | |
| y1 | |
| y2 | |
| y3 | |
| z1 | |
| z2 | |
| z3 |
| auto AffineMatrix::data | ( | ) | ->float * |
| auto AffineMatrix::data | ( | ) | const->constfloat * |
| auto AffineMatrix::get | ( | int | row, |
| int | col )->float & |
| auto AffineMatrix::get | ( | int | row, |
| int | col ) const->float |
| auto AffineMatrix::identity | ( | ) | ->AffineMatrix & |
Converts the current matrix into the identity matrix.
| auto AffineMatrix::operator() | ( | int | row, |
| int | col )->float & |
| auto AffineMatrix::operator() | ( | int | row, |
| int | col ) const->float |
| auto AffineMatrix::operator* | ( | const AffineMatrix & | Other | ) | const->AffineMatrix |
NOTE: THIS MULTIPLIES MATRICES AS THEY ARE WRITTEN (UNLIKE *=) e.g.
S = S * T works as it is written
| Other | The matrix you want to multiply this matrix into |
| auto AffineMatrix::operator*= | ( | const AffineMatrix & | Other | ) | ->AffineMatrix & |
NOTE: THIS FLIPS MULTIPLICATION ORDER SO THE MATRICES PROPERLY MULTIPLY e.g.
S *= T is equivalent to S = T * S
| Other | The matrix you want to apply to this matrix |
|
default |
| auto AffineMatrix::rotate | ( | float | angle | ) | ->AffineMatrix & |
| angle | The angle of the desired transformation in DEGREES |
| auto AffineMatrix::scale | ( | const Vector4D & | vector | ) | ->AffineMatrix & |
| auto AffineMatrix::scale | ( | float | s | ) | ->AffineMatrix & |
| auto AffineMatrix::scale | ( | float | x, |
| float | y )->AffineMatrix & |
| auto AffineMatrix::translate | ( | const Vector4D & | vector | ) | ->AffineMatrix & |
| vector | a vector that you want to set as the translation component of the affine transformation |
| auto AffineMatrix::translate | ( | float | x, |
| float | y )->AffineMatrix & |
| x | |
| y |
| auto AffineMatrix::transpose | ( | ) | ->AffineMatrix & |
Transposes the current matrix.
|
friend |
scales every value of the matrix by a float
| matrix | the matrix |
| scalar | the float |
|
friend |
matrix times vector.
performs rhs*lhs
| rhs | the matrix |
| lhs | the vector |
|
friend |
scales every value of the matrix by a float
| scalar | the float |
| matrix | the matrix |
|
friend |
scales every value of the matrix by a float
| matrix | the matrix |
| scalar | the float |
|
friend |
applies a transformation to a vector.
a*=b is equivalent to a = b * a
| rhs | the Vector to operate on |
| lhs | the transformation to apply |
|
private |