TwiceAsNice  2019-02-18
Public Member Functions | Public Attributes | List of all members
Lics::LicsAffTrans Class Reference

A LicsAffTrans object is an affine 2D transformation (rotation plus shift). The effect is first the active rotation and then the active shift/translation. More...

#include <LicsAffTrans.h>

Collaboration diagram for Lics::LicsAffTrans:
Collaboration graph

Public Member Functions

 LicsAffTrans ()
 default ctor. This is effectively a unity operation which does not move the point. More...
 
 LicsAffTrans (double ang)
 Constructor for a pure rotation. More...
 
 LicsAffTrans (const double(*rot)[2])
 Constructor for a pure scale-rotation. More...
 
 LicsAffTrans (const double(*rot)[2], const double *shif)
 Constructor for the general case. More...
 
void apply (const double *in, double *out) const
 Apply the transformation. First rotate, then translate. The operations don't commute in general. More...
 
void apply (const float *in, float *out) const
 Apply the transformation. First rotate, then translate. The operations don't commute in general. More...
 
void apply (const Nice::Point &in, Nice::Point &out) const
 Apply the transformation. First rotate, then translate. The operations don't commute in general. More...
 
LicsAffTrans inverse () const
 Construct the inverse transformation. More...
 
double meanScale () const
 Mean scale of the transformation. More...
 
 LicsAffTrans ()
 
 LicsAffTrans (double ang)
 
 LicsAffTrans (const double(*rot)[2])
 
 LicsAffTrans (const double(*rot)[2], const double *shif)
 
void apply (const double *in, double *out) const
 
void apply (const float *in, float *out) const
 
void apply (const Nice::Point &in, Nice::Point &out) const
 
LicsAffTrans inverse () const
 
double meanScale () const
 

Public Attributes

double rmat [2][2]
 2 by 2 (maybe skew) rotation matrix. More...
 
double trans [2]
 translation vector. More...
 

Detailed Description

A LicsAffTrans object is an affine 2D transformation (rotation plus shift). The effect is first the active rotation and then the active shift/translation.


Since
2017-08-03
Author
R. J. Mathar

Constructor & Destructor Documentation

◆ LicsAffTrans() [1/8]

Lics::LicsAffTrans::LicsAffTrans ( )

default ctor. This is effectively a unity operation which does not move the point.


Since
2017-08-03

◆ LicsAffTrans() [2/8]

Lics::LicsAffTrans::LicsAffTrans ( double  ang)

Constructor for a pure rotation.


Parameters
angThe angle (in radians) for the active rotation. Counter-clockwise.
Since
2017-08-03

◆ LicsAffTrans() [3/8]

Lics::LicsAffTrans::LicsAffTrans ( const double(*)  rot[2])

Constructor for a pure scale-rotation.


Parameters
rotThe 2x2 rotation matrix. This includes a flip if the determinant is negative.
Since
2017-08-03

◆ LicsAffTrans() [4/8]

Lics::LicsAffTrans::LicsAffTrans ( const double(*)  rot[2],
const double *  shif 
)

Constructor for the general case.


Parameters
rotThe 2x2 rotation matrix. This includes a flip if the determinant is negative.
shifThe shift/translation vvector.
Since
2017-08-03

◆ LicsAffTrans() [5/8]

Lics::LicsAffTrans::LicsAffTrans ( )

◆ LicsAffTrans() [6/8]

Lics::LicsAffTrans::LicsAffTrans ( double  ang)

◆ LicsAffTrans() [7/8]

Lics::LicsAffTrans::LicsAffTrans ( const double(*)  rot[2])

◆ LicsAffTrans() [8/8]

Lics::LicsAffTrans::LicsAffTrans ( const double(*)  rot[2],
const double *  shif 
)

Member Function Documentation

◆ apply() [1/6]

void Lics::LicsAffTrans::apply ( const double *  in,
double *  out 
) const

Apply the transformation. First rotate, then translate. The operations don't commute in general.


Parameters
inThe 2D source vector/position
outThe 2D image vector/position
Since
2017-08-03

◆ apply() [2/6]

void Lics::LicsAffTrans::apply ( const double *  in,
double *  out 
) const

◆ apply() [3/6]

void Lics::LicsAffTrans::apply ( const float *  in,
float *  out 
) const

Apply the transformation. First rotate, then translate. The operations don't commute in general.


Parameters
inThe 2D source vector/position
outThe 2D image vector/position
Since
2017-12-01

◆ apply() [4/6]

void Lics::LicsAffTrans::apply ( const float *  in,
float *  out 
) const

◆ apply() [5/6]

void Lics::LicsAffTrans::apply ( const Nice::Point in,
Nice::Point out 
) const

◆ apply() [6/6]

void Lics::LicsAffTrans::apply ( const Nice::Point in,
Nice::Point out 
) const

Apply the transformation. First rotate, then translate. The operations don't commute in general.


Parameters
inThe 2D source vector/position
outThe 2D image vector/position
Since
2017-08-24

◆ inverse() [1/2]

LicsAffTrans Lics::LicsAffTrans::inverse ( ) const

◆ inverse() [2/2]

Lics::LicsAffTrans Lics::LicsAffTrans::inverse ( ) const

Construct the inverse transformation.


Returns
A transformation that would give the unit transformation of concatenated with this.
Since
2017-08-03

◆ meanScale() [1/2]

double Lics::LicsAffTrans::meanScale ( ) const

◆ meanScale() [2/2]

double Lics::LicsAffTrans::meanScale ( ) const

Mean scale of the transformation.


Returns
square root of the absolute value of the determinant.
Since
2017-12-01

Member Data Documentation

◆ rmat

double Lics::LicsAffTrans::rmat

2 by 2 (maybe skew) rotation matrix.

If sign of the determinant is negative, it includes a flip.

◆ trans

double Lics::LicsAffTrans::trans

translation vector.


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