JugiMap Framework
AffineMat3< T > Struct Template Reference

Matrix representation of the affine transformation. More...

#include <jmCommon.h>

Public Member Functions

 AffineMat3 ()
 Constructs an identity matrix. More...
 
 AffineMat3 (const Vec2< T > &_i, const Vec2< T > &_j, const Vec2< T > &_t)
 Constructs a matrix from the given row vectors **_i**, **_j** and **_t**. More...
 
 AffineMat3 (T ix, T iy, T jx, T jy, T tx, T ty)
 Constructs a matrix from the given row vector components ix, iy, jx, jy, tx and ty. More...
 
AffineMat3< TInvert () const
 Returns a matrix formed by inverting this matrix. More...
 
Vec2< Toperator* (const Vec2< T > &v) const
 Returns a matrix formed by multiplying this matrix with the given vector v. More...
 
AffineMat3< Toperator* (const AffineMat3< T > &m) const
 Returns a matrix formed by multiplying this matrix with the given matrix m. More...
 
Vec2< TTransform (const Vec2< T > &v) const
 Returns a vector formed by multiplying the given vector v with this matrix. More...
 
Vec2< TTransform (T x, T y) const
 Returns a vector formed by multiplying the given coordinate x,y with this matrix. More...
 
AffineMat3< TTransform (float ix, float iy, float jx, float jy, float tx, float ty) const
 Returns a matrix formed by multiplying this matrix with the given matrix components ix, iy, jx, jy, tx and ty. More...
 
AffineMat3< TTranslate (T tx, T ty) const
 Returns a matrix formed by translating this matrix by the given vector coordinates tx and ty. More...
 
AffineMat3< TTranslate (const Vec2< T > &tv) const
 Returns a matrix formed by translating this matrix by the given vector tv. More...
 
AffineMat3< TRotate (double rz) const
 Returns a matrix formed by rotating this matrix by the given angle rz; the angle is in radians. More...
 
AffineMat3< TScale (T sx, T sy) const
 Returns a matrix formed by scaling this matrix by the given vector components sx and sy. More...
 
AffineMat3< TScale (const Vec2< T > &sv) const
 Returns a matrix formed by scaling this matrix by the given vector sv. More...
 

Static Public Member Functions

static AffineMat3< TTranslation (T tx, T ty)
 Creates a matrix representing a translation by the given vector coordinates tx and ty. More...
 
static AffineMat3< TTranslation (const Vec2< T > &tv)
 Creates a matrix representing a translation by the given vector tv. More...
 
static AffineMat3< TRotation (double rz)
 Creates a matrix representing a rotation by the given angle rz; the angle is in radians. More...
 
static AffineMat3< TScaling (T sx, T sy)
 Creates a matrix representing a scaling by the given vector components sx and sy. More...
 
static AffineMat3< TScaling (const Vec2< T > &sv)
 Creates a matrix representing a scaling by the given vector sv. More...
 
static AffineMat3< TOrtho (T left, T right, T bottom, T top)
 Creates a matrix representing an orthographic projection. More...
 

Public Attributes

Vec2< Ti
 The first row of the matrix. More...
 
Vec2< Tj
 The second row of the matrix. More...
 
Vec2< Tt
 The third row of the matrix. More...
 

Detailed Description

template<typename T>
struct jugimap::AffineMat3< T >

Matrix representation of the affine transformation.

Constructor & Destructor Documentation

◆ AffineMat3() [1/3]

AffineMat3 ( )
inline

Constructs an identity matrix.

◆ AffineMat3() [2/3]

AffineMat3 ( const Vec2< T > &  _i,
const Vec2< T > &  _j,
const Vec2< T > &  _t 
)
inline

Constructs a matrix from the given row vectors **_i**, **_j** and **_t**.

◆ AffineMat3() [3/3]

AffineMat3 ( T  ix,
T  iy,
T  jx,
T  jy,
T  tx,
T  ty 
)
inline

Constructs a matrix from the given row vector components ix, iy, jx, jy, tx and ty.

Member Function Documentation

◆ Invert()

AffineMat3<T> Invert ( ) const
inline

Returns a matrix formed by inverting this matrix.

◆ operator*() [1/2]

Vec2<T> operator* ( const Vec2< T > &  v) const
inline

Returns a matrix formed by multiplying this matrix with the given vector v.

◆ operator*() [2/2]

AffineMat3<T> operator* ( const AffineMat3< T > &  m) const
inline

Returns a matrix formed by multiplying this matrix with the given matrix m.

◆ Transform() [1/3]

Vec2<T> Transform ( const Vec2< T > &  v) const
inline

Returns a vector formed by multiplying the given vector v with this matrix.

◆ Transform() [2/3]

Vec2<T> Transform ( T  x,
T  y 
) const
inline

Returns a vector formed by multiplying the given coordinate x,y with this matrix.

◆ Transform() [3/3]

AffineMat3<T> Transform ( float  ix,
float  iy,
float  jx,
float  jy,
float  tx,
float  ty 
) const
inline

Returns a matrix formed by multiplying this matrix with the given matrix components ix, iy, jx, jy, tx and ty.

◆ Translate() [1/2]

AffineMat3<T> Translate ( T  tx,
T  ty 
) const
inline

Returns a matrix formed by translating this matrix by the given vector coordinates tx and ty.

◆ Translate() [2/2]

AffineMat3<T> Translate ( const Vec2< T > &  tv) const
inline

Returns a matrix formed by translating this matrix by the given vector tv.

◆ Rotate()

AffineMat3<T> Rotate ( double  rz) const
inline

Returns a matrix formed by rotating this matrix by the given angle rz; the angle is in radians.

◆ Scale() [1/2]

AffineMat3<T> Scale ( T  sx,
T  sy 
) const
inline

Returns a matrix formed by scaling this matrix by the given vector components sx and sy.

◆ Scale() [2/2]

AffineMat3<T> Scale ( const Vec2< T > &  sv) const
inline

Returns a matrix formed by scaling this matrix by the given vector sv.

◆ Translation() [1/2]

static AffineMat3<T> Translation ( T  tx,
T  ty 
)
inlinestatic

Creates a matrix representing a translation by the given vector coordinates tx and ty.

◆ Translation() [2/2]

static AffineMat3<T> Translation ( const Vec2< T > &  tv)
inlinestatic

Creates a matrix representing a translation by the given vector tv.

◆ Rotation()

static AffineMat3<T> Rotation ( double  rz)
inlinestatic

Creates a matrix representing a rotation by the given angle rz; the angle is in radians.

◆ Scaling() [1/2]

static AffineMat3<T> Scaling ( T  sx,
T  sy 
)
inlinestatic

Creates a matrix representing a scaling by the given vector components sx and sy.

◆ Scaling() [2/2]

static AffineMat3<T> Scaling ( const Vec2< T > &  sv)
inlinestatic

Creates a matrix representing a scaling by the given vector sv.

◆ Ortho()

static AffineMat3<T> Ortho ( T  left,
T  right,
T  bottom,
T  top 
)
inlinestatic

Creates a matrix representing an orthographic projection.

Member Data Documentation

◆ i

Vec2<T> i

The first row of the matrix.

◆ j

Vec2<T> j

The second row of the matrix.

◆ t

Vec2<T> t

The third row of the matrix.


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