common::AFFINE2D Struct Reference
[Math ModuleAffine 2D transform]

Affine transform of 2D point/vector. More...

#include <Math.hpp>

List of all members.

Public Member Functions

 AFFINE2D ()
 AFFINE2D (float a, float b, float c, float d, float e, float f)
 AFFINE2D (const float *arr)
 operator float * ()
 operator const float * () const
float & operator[] (size_t index)
float operator[] (size_t index) const
bool operator== (const AFFINE2D &rhs) const
bool operator!= (const AFFINE2D &rhs) const
float & operator() (uint row, uint col)
float operator() (uint row, uint col) const
AFFINE2D operator+ () const
AFFINE2D operator- () const
AFFINE2D operator+ (const AFFINE2D &rhs) const
AFFINE2D operator- (const AFFINE2D &rhs) const
AFFINE2D operator* (const AFFINE2D &rhs) const
AFFINE2Doperator+= (const AFFINE2D &rhs)
AFFINE2Doperator-= (const AFFINE2D &rhs)
AFFINE2Doperator*= (const AFFINE2D &rhs)
AFFINE2D operator* (float s) const
AFFINE2D operator/ (float s) const
AFFINE2Doperator*= (float s)
AFFINE2Doperator/= (float s)

Public Attributes

union {
   struct {
      float   a
      float   b
      float   c
      float   d
      float   e
      float   f
   } 
   float   m [2][3]
}; 

Detailed Description

Affine transform of 2D point/vector.

(xOut, yOut) = | a b |  | x | + | c |
               | d e |  | y |   | f |

It means that:

(xOut, yOut) = (a*x + b*y + c, d*x + e*y + f)

Multiplication order is OpenGL-like, opposite to what MATRIX represents.
Elements are indexed as [row, column].
Text representation is: a,b,c;d,e,f


Constructor & Destructor Documentation

common::AFFINE2D::AFFINE2D (  )  [inline]
common::AFFINE2D::AFFINE2D ( float  a,
float  b,
float  c,
float  d,
float  e,
float  f 
) [inline]
common::AFFINE2D::AFFINE2D ( const float *  arr  )  [inline]

Member Function Documentation

common::AFFINE2D::operator const float * (  )  const [inline]
common::AFFINE2D::operator float * (  )  [inline]
bool common::AFFINE2D::operator!= ( const AFFINE2D rhs  )  const [inline]
float common::AFFINE2D::operator() ( uint  row,
uint  col 
) const [inline]
float& common::AFFINE2D::operator() ( uint  row,
uint  col 
) [inline]
AFFINE2D common::AFFINE2D::operator* ( float  s  )  const [inline]
AFFINE2D common::AFFINE2D::operator* ( const AFFINE2D rhs  )  const [inline]
AFFINE2D& common::AFFINE2D::operator*= ( float  s  )  [inline]
AFFINE2D& common::AFFINE2D::operator*= ( const AFFINE2D rhs  )  [inline]
AFFINE2D common::AFFINE2D::operator+ ( const AFFINE2D rhs  )  const [inline]
AFFINE2D common::AFFINE2D::operator+ (  )  const [inline]
AFFINE2D& common::AFFINE2D::operator+= ( const AFFINE2D rhs  )  [inline]
AFFINE2D common::AFFINE2D::operator- ( const AFFINE2D rhs  )  const [inline]
AFFINE2D common::AFFINE2D::operator- (  )  const [inline]
AFFINE2D& common::AFFINE2D::operator-= ( const AFFINE2D rhs  )  [inline]
AFFINE2D common::AFFINE2D::operator/ ( float  s  )  const [inline]
AFFINE2D& common::AFFINE2D::operator/= ( float  s  )  [inline]
bool common::AFFINE2D::operator== ( const AFFINE2D rhs  )  const [inline]
float common::AFFINE2D::operator[] ( size_t  index  )  const [inline]
float& common::AFFINE2D::operator[] ( size_t  index  )  [inline]

Member Data Documentation

union { ... }
float common::AFFINE2D::m[2][3]

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

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