sf::Matrix3 Class Reference
Utility class to manipulate 3x3 matrices representing 2D transformations. More...
#include <Matrix3.hpp>
Public Member Functions | |
Matrix3 () | |
Default constructor (builds an identity matrix). | |
Matrix3 (float a00, float a01, float a02, float a10, float a11, float a12, float a20, float a21, float a22) | |
Construct a matrix from its 9 elements. | |
void | SetFromTransformations (const Vector2f &Center, const Vector2f &Translation, float Rotation, const Vector2f &Scale) |
Build a matrix from a set of transformations. | |
Vector2f | Transform (const Vector2f &Point) const |
Transform a point by the matrix. | |
Matrix3 | GetInverse () const |
Return the inverse of the matrix. | |
const float * | Get4x4Elements () const |
Return the elements of the matrix as a 4x4, in an array of 16 floats. | |
float | operator() (unsigned int Row, unsigned int Col) const |
Operator () overloads to access the matrix elements. | |
float & | operator() (unsigned int Row, unsigned int Col) |
Matrix3 | operator* (const Matrix3 &Mat) const |
Operator * overload to multiply two matrices. | |
Matrix3 & | operator*= (const Matrix3 &Mat) |
Operator *= overload to multiply-assign two matrices. | |
Static Public Attributes | |
static const Matrix3 | Identity |
Identity matrix. |
Detailed Description
Utility class to manipulate 3x3 matrices representing 2D transformations.Definition at line 42 of file Matrix3.hpp.
Constructor & Destructor Documentation
sf::Matrix3::Matrix3 | ( | ) |
Default constructor (builds an identity matrix).
sf::Matrix3::Matrix3 | ( | float | a00, | |
float | a01, | |||
float | a02, | |||
float | a10, | |||
float | a11, | |||
float | a12, | |||
float | a20, | |||
float | a21, | |||
float | a22 | |||
) |
Construct a matrix from its 9 elements.
Member Function Documentation
const float* sf::Matrix3::Get4x4Elements | ( | ) | const |
Return the elements of the matrix as a 4x4, in an array of 16 floats.
- Returns:
- Pointer to the 4x4 matrix elements
Matrix3 sf::Matrix3::GetInverse | ( | ) | const |
Return the inverse of the matrix.
- Returns:
- A new matrix which is the inverse of this
float sf::Matrix3::operator() | ( | unsigned int | Row, | |
unsigned int | Col | |||
) | const |
Operator () overloads to access the matrix elements.
- Parameters:
-
Row : Element row (0 based) Col : Element column (0 based)
- Returns:
- Matrix element (Row, Col)
Operator * overload to multiply two matrices.
- Parameters:
-
Mat : Matrix to multiply
- Returns:
- this * Mat
Operator *= overload to multiply-assign two matrices.
- Parameters:
-
Mat : Matrix to multiply
- Returns:
- this * Mat
void sf::Matrix3::SetFromTransformations | ( | const Vector2f & | Center, | |
const Vector2f & | Translation, | |||
float | Rotation, | |||
const Vector2f & | Scale | |||
) |
Build a matrix from a set of transformations.
- Parameters:
-
Center : Origin for the transformations Translation : Translation offset Rotation : Rotation angle in degrees Scale : Scaling factors
Transform a point by the matrix.
- Parameters:
-
Point : Point to transform
- Returns:
- Transformed point
Member Data Documentation
const Matrix3 sf::Matrix3::Identity [static] |
The documentation for this class was generated from the following files:
:: Copyright © 2007-2008 Laurent Gomila, all rights reserved :: Documentation generated by doxygen 1.5.2 ::