A class for 2D matrices and related operations. More...
#include <Matrix.hpp>
Public Member Functions | |
Matrix2D () | |
Default constructor, initializes matrix to the identity matrix. | |
void | Identity () |
Creates an identity matrix internally. | |
void | Translate (float x, float y) |
Creates a transformation matrix internally. | |
void | Scale (float xScale, float yScale) |
Creates a scale matrix internally. | |
void | Rotate (float rotation) |
Creates a rotation matrix internally from a float. | |
void | Rotate (const steer::Vector2 &fwd, const steer::Vector2 &side) |
Creates a rotation matrix internally from two vectors (steer::Vector2 - forward and side vectors most commonly, but not necessarily). | |
void | TransformVector2Ds (std::vector< steer::Vector2 > &vPoints) |
Applies a transformation matrix to a std::vector of points. | |
void | TransformVector2Ds (steer::Vector2 &vPoint) |
void | _11 (float val) |
void | _12 (float val) |
void | _13 (float val) |
void | _21 (float val) |
void | _22 (float val) |
void | _23 (float val) |
void | _31 (float val) |
void | _32 (float val) |
void | _33 (float val) |
A class for 2D matrices and related operations.
|
inline |
Creates a rotation matrix internally from a float.
rotation | - a plain old float. |
|
inline |
Creates a rotation matrix internally from two vectors (steer::Vector2 - forward and side vectors most commonly, but not necessarily).
fwd | - a steer::Vector2 of floats. |
side | - a steer::Vector2 of floats. |
|
inline |
Creates a scale matrix internally.
xScale | - a plain old float. |
yScale | - a plain old float. |
|
inline |
Applies a transformation matrix to a std::vector of points.
Applies a transformation matrix to a point (steer::Vector2).
vPoints | - a std::vector of steer::Vector2 floats. |
vPoint | - a steer::Vector2 of floats. |
|
inline |
Creates a transformation matrix internally.
x | - a plain old float. |
y | - a plain old float. |