#include <Matrix2.hpp>
| Public Member Functions | |
| Matrix2 () | |
| Matrix2 (const Matrix2 &_obj) | |
| Matrix2 (float _sx, float _shy, float _shx, float _sy, float _tx, float _ty) | |
| Matrix2 (const float *_values) | |
| Matrix2 (const double *_values) | |
| void | identity () | 
| const Matrix2 & | operator= (const Matrix2 &_obj) | 
| bool | operator== (const Matrix2 &_obj) const | 
| bool | operator!= (const Matrix2 &_obj) const | 
| const Matrix2 & | operator+= (const Matrix2 &_obj) | 
| Matrix2 | operator+ (const Matrix2 &_obj) const | 
| const Matrix2 & | operator-= (const Matrix2 &_obj) | 
| Matrix2 | operator- (const Matrix2 &_obj) const | 
| const Matrix2 & | operator*= (const Matrix2 &_obj) | 
| Matrix2 | operator* (const Matrix2 &_obj) | 
| vec2 | operator* (const vec2 &_point) const | 
| vec2 | applyScaleRotation (const vec2 &_point) const | 
| Matrix2 | operator~ () const | 
| void | flipX () | 
| void | flipY () | 
| void | scale (const vec2 &_vect) | 
| void | scale (float _value) | 
| void | rotate (float _angleRad) | 
| void | translate (const vec2 &_vect) | 
| float | determinant () const | 
| void | invert () | 
| Public Attributes | |
| float | m_mat [2 *3] | 
Detailed Description
Transformation matrix for vector 2D.
Constructor & Destructor Documentation
§ Matrix2() [1/5]
| etk::Matrix2::Matrix2 | ( | ) | 
Constructor that load identity.
§ Matrix2() [2/5]
| etk::Matrix2::Matrix2 | ( | const Matrix2 & | _obj | ) | 
Copy constructor.
- Parameters
- 
  [in] _obj Matrix object to copy 
§ Matrix2() [3/5]
| etk::Matrix2::Matrix2 | ( | float | _sx, | 
| float | _shy, | ||
| float | _shx, | ||
| float | _sy, | ||
| float | _tx, | ||
| float | _ty | ||
| ) | 
Configuration constructor.
- Parameters
- 
  [in] _sx Scale threw X axis [in] _shy Rotate in radian threw Y axis [in] _shx Rotate in radian threw X axis [in] _sy Scale threw Y axis [in] _tx Translate threw X axis [in] _ty translate threw Y axis 
§ Matrix2() [4/5]
| etk::Matrix2::Matrix2 | ( | const float * | _values | ) | 
Configuration constructor.
- Parameters
- 
  [in] _values vector of values in float 
§ Matrix2() [5/5]
| etk::Matrix2::Matrix2 | ( | const double * | _values | ) | 
Configuration constructor.
- Parameters
- 
  [in] _values vector of values in double 
Member Function Documentation
§ applyScaleRotation()
Apply matrix on a vector Scale Rotate, but NOT the translation.
- Parameters
- 
  [in] _point Point value to apply the matrix 
- Returns
- New vector containing the value
§ determinant()
| float etk::Matrix2::determinant | ( | ) | const | 
Computes the determinant of the matrix.
- Returns
- The determinent Value.
§ flipX()
| void etk::Matrix2::flipX | ( | ) | 
Flip the mathix threw the X axis.
§ flipY()
| void etk::Matrix2::flipY | ( | ) | 
Flip the mathix threw the Y axis.
§ identity()
| void etk::Matrix2::identity | ( | ) | 
Load Identity matrix.
§ invert()
| void etk::Matrix2::invert | ( | ) | 
Inverts the matrix.
- Note
- The determinant must be != 0, otherwithe the matrix can't be inverted.
- Returns
- The inverted matrix.
§ operator!=()
| bool etk::Matrix2::operator!= | ( | const Matrix2 & | _obj | ) | const | 
In-Equality compare operator with an other object.
- Parameters
- 
  [in] _obj Reference on the comparing object 
- Returns
- true The Objects are NOT identical
- false The Objects are identical
§ operator*() [1/2]
Operator* Multiplication an other matrix with this one.
- Parameters
- 
  [in] _obj Reference on the external object 
- Returns
- New vector containing the value
§ operator*() [2/2]
Operator* apply matrix on a vector.
- Parameters
- 
  [in] _point Point value to apply the matrix 
- Returns
- New vector containing the value
§ operator*=()
Operator*= Multiplication an other matrix with this one.
- Parameters
- 
  [in] _obj Reference on the external object 
- Returns
- Local reference of the vector multiplicated
§ operator+()
Operator+ Addition an other matrix with this one.
- Parameters
- 
  [in] _obj Reference on the external object 
- Returns
- New vector containing the value
§ operator+=()
Operator+= Addition an other matrix with this one.
- Parameters
- 
  [in] _obj Reference on the external object 
- Returns
- Local reference of the vector additionned
§ operator-()
Operator- Decrement an other matrix with this one.
- Parameters
- 
  [in] _obj Reference on the external object 
- Returns
- New vector containing the value
§ operator-=()
Operator-= Decrement an other matrix with this one.
- Parameters
- 
  [in] _obj Reference on the external object 
- Returns
- Local reference of the vector decremented
§ operator=()
Operator= Asign the current object with an other object.
- Parameters
- 
  [in] _obj Reference on the external object 
- Returns
- Local reference of the vector asigned
§ operator==()
| bool etk::Matrix2::operator== | ( | const Matrix2 & | _obj | ) | const | 
Equality compare operator with an other object.
- Parameters
- 
  [in] _obj Reference on the comparing object 
- Returns
- true The Objects are identical
- false The Objects are NOT identical
§ operator~()
| Matrix2 etk::Matrix2::operator~ | ( | ) | const | 
Inverse the current Matrix.
- Returns
- New vector containing the value
§ rotate()
| void etk::Matrix2::rotate | ( | float | _angleRad | ) | 
Makes a rotation matrix.
- Parameters
- 
  [in] _angleRad angle to apply. 
§ scale() [1/2]
| void etk::Matrix2::scale | ( | const vec2 & | _vect | ) | 
Scale the current Matrix.
- Parameters
- 
  [in] _vect Vector to scale matrix. 
§ scale() [2/2]
| void etk::Matrix2::scale | ( | float | _value | ) | 
Scale the current Matrix.
- Parameters
- 
  [in] _value Single value to scale in X andf Y. 
§ translate()
| void etk::Matrix2::translate | ( | const vec2 & | _vect | ) | 
Makes a translation of the matrix.
- Parameters
- 
  [in] _vect Translation to apply. 
Member Data Documentation
§ m_mat
| float etk::Matrix2::m_mat[2 *3] | 
Internal data sx shx tx sy shy ty.
The documentation for this class was generated from the following file:
- framework/atria-soft/etk/etk/math/Matrix2.hpp
 1.8.12
 1.8.12