Steeriously  0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Classes | Public Member Functions | List of all members
steer::Matrix2D Class Reference

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)
 

Detailed Description

A class for 2D matrices and related operations.

Member Function Documentation

void steer::Matrix2D::Rotate ( float  rotation)
inline

Creates a rotation matrix internally from a float.

Parameters
rotation- a plain old float.
void steer::Matrix2D::Rotate ( const steer::Vector2 fwd,
const steer::Vector2 side 
)
inline

Creates a rotation matrix internally from two vectors (steer::Vector2 - forward and side vectors most commonly, but not necessarily).

Parameters
fwd- a steer::Vector2 of floats.
side- a steer::Vector2 of floats.
void steer::Matrix2D::Scale ( float  xScale,
float  yScale 
)
inline

Creates a scale matrix internally.

Parameters
xScale- a plain old float.
yScale- a plain old float.
void steer::Matrix2D::TransformVector2Ds ( std::vector< steer::Vector2 > &  vPoints)
inline

Applies a transformation matrix to a std::vector of points.

Applies a transformation matrix to a point (steer::Vector2).

Parameters
vPoints- a std::vector of steer::Vector2 floats.
vPoint- a steer::Vector2 of floats.
void steer::Matrix2D::Translate ( float  x,
float  y 
)
inline

Creates a transformation matrix internally.

Parameters
x- a plain old float.
y- a plain old float.

The documentation for this class was generated from the following file: