Affine 2D transform
[Math Module]

Classes

struct  common::AFFINE2D
 Affine transform of 2D point/vector. More...

Functions

void common::Affine2dToStr (tstring *Out, const AFFINE2D &aff)
bool common::StrToAffine2d (AFFINE2D *Out, const tstring &Str)
void common::swap (AFFINE2D &aff1, AFFINE2D &aff2)
void common::Mul (AFFINE2D &out, const AFFINE2D &lhs, const AFFINE2D &rhs)
 Per component multiplication.
void common::Div (AFFINE2D &out, const AFFINE2D &lhs, const AFFINE2D &rhs)
 Per component division.
void common::Transform (VEC2 &out, const VEC2 &v, const AFFINE2D &aff)
 2D point transformation, including translation.
void common::TransformNormal (VEC2 &out, const VEC2 &v, const AFFINE2D &aff)
 2D vector transformation by 2x2 submatrix, with no translation.
void common::Translation (AFFINE2D &out, const VEC2 &v)
void common::Translation (AFFINE2D &out, float x, float y)
void common::Scaling (AFFINE2D &out, float s)
void common::Scaling (AFFINE2D &out, const VEC2 &v)
void common::Scaling (AFFINE2D &out, float x, float y)
void common::Rotation (AFFINE2D &out, float angle)
void common::Transpose (AFFINE2D &inout)
 Transposes the 2x2 submatrix.
void common::Lerp (AFFINE2D &out, const AFFINE2D &lhs, const AFFINE2D &rhs, float t)
void common::Inverse (AFFINE2D &out, const AFFINE2D &aff)
void common::Affine2dToMatrix (MATRIX &out, const AFFINE2D &aff)
void common::MatrixToAffine2d (AFFINE2D &out, const MATRIX &m)

Variables

const AFFINE2D common::AFFINE2D_ZERO
const AFFINE2D common::AFFINE2D_IDENTITY

Detailed Description


Function Documentation

void common::Affine2dToMatrix ( MATRIX &  out,
const AFFINE2D &  aff 
)

Transforms between AFFINE2D and MATRIX, where MATRIX looks like this:

| a d 0 0 |
| b e 0 0 |
| 0 0 1 0 |
| c f 0 1 |
void common::Affine2dToStr ( tstring *  Out,
const AFFINE2D &  aff 
)
void common::Div ( AFFINE2D &  out,
const AFFINE2D &  lhs,
const AFFINE2D &  rhs 
) [inline]

Per component division.

void common::Inverse ( AFFINE2D &  out,
const AFFINE2D &  aff 
)
void common::Lerp ( AFFINE2D &  out,
const AFFINE2D &  lhs,
const AFFINE2D &  rhs,
float  t 
)
void common::MatrixToAffine2d ( AFFINE2D &  out,
const MATRIX &  m 
)

Transforms between AFFINE2D and MATRIX, where MATRIX looks like this:

| a d 0 0 |
| b e 0 0 |
| 0 0 1 0 |
| c f 0 1 |

void common::Mul ( AFFINE2D &  out,
const AFFINE2D &  lhs,
const AFFINE2D &  rhs 
) [inline]

Per component multiplication.

void common::Rotation ( AFFINE2D &  out,
float  angle 
) [inline]
void common::Scaling ( AFFINE2D &  out,
float  x,
float  y 
) [inline]
void common::Scaling ( AFFINE2D &  out,
const VEC2 &  v 
) [inline]
void common::Scaling ( AFFINE2D &  out,
float  s 
) [inline]
bool common::StrToAffine2d ( AFFINE2D *  Out,
const tstring &  Str 
)
void common::swap ( AFFINE2D &  aff1,
AFFINE2D &  aff2 
) [inline]
void common::Transform ( VEC2 &  out,
const VEC2 &  v,
const AFFINE2D &  aff 
) [inline]

2D point transformation, including translation.

void common::TransformNormal ( VEC2 &  out,
const VEC2 &  v,
const AFFINE2D &  aff 
) [inline]

2D vector transformation by 2x2 submatrix, with no translation.

void common::Translation ( AFFINE2D &  out,
float  x,
float  y 
) [inline]
void common::Translation ( AFFINE2D &  out,
const VEC2 &  v 
) [inline]
void common::Transpose ( AFFINE2D &  inout  )  [inline]

Transposes the 2x2 submatrix.


Variable Documentation

const AFFINE2D common::AFFINE2D_IDENTITY
const AFFINE2D common::AFFINE2D_ZERO

Generated on Wed Dec 16 20:44:53 2009 for CommonLib by  doxygen 1.6.1