Public Member Functions | Static Public Member Functions | List of all members
i2d::CAffine2d Class Reference

This class defines an affine 2D-transformation. More...

#include <CAffine2d.h>

Inheritance diagram for i2d::CAffine2d:
iview::CScreenTransform

Public Member Functions

 CAffine2d ()
 Constructor, parameters will be not initialized. More...
 
 CAffine2d (const CAffine2d &transform)
 Copy constructor, transformation data will be copied from the input object. More...
 
 CAffine2d (const CMatrix2d &deform, const CVector2d &translation=CVector2d(0.0, 0.0))
 Constructs a transform using specified deformation matrix and translation. More...
 
 CAffine2d (const CVector2d &translation)
 Constructs a transform with translation only. More...
 
const CVector2dGetTranslation () const
 Get translation part of this affine transformation. More...
 
void SetTranslation (const CVector2d &translation)
 Set translation part of this affine transformation. More...
 
const CMatrix2dGetDeformMatrix () const
 Get rotation, skew and scale part of this affine transformation. More...
 
void SetDeformMatrix (const CMatrix2d &deform)
 Set rotation, skew and scale part of this affine transformation. More...
 
CVector2dGetTranslationRef ()
 Get internal reference to the translation vector. More...
 
CMatrix2dGetDeformMatrixRef ()
 Get internal reference to the transformation matrix. More...
 
void Reset ()
 Set to identity transformation. More...
 
void Reset (const CVector2d &translation)
 Set this transformation to translation. More...
 
void Reset (const CVector2d &translation, double angle, double scale=1.0)
 Set this transformation to a given translation, rotation and scaling. More...
 
void Reset (const CVector2d &translation, double angle, const CVector2d &scale)
 Set this transformation to a given translation, rotation and both axis scaling. More...
 
CVector2d GetApply (const CVector2d &position) const
 Calculate transformed position. More...
 
void GetApply (const CVector2d &position, CVector2d &result) const
 Get position after this transformation. More...
 
CVector2d GetApplyToDelta (const CVector2d &delta) const
 Get difference vector after this transformation. More...
 
void GetApplyToDelta (const CVector2d &delta, CVector2d &result) const
 Get vector after this transformation. More...
 
CAffine2d GetApply (const CAffine2d &transform) const
 Get combined transformation. More...
 
void GetApply (const CAffine2d &transform, CAffine2d &result) const
 Get combined transformation. More...
 
void Apply (const CAffine2d &transform)
 Combine this transformation with another transformation. More...
 
void ApplyLeft (const CAffine2d &transform)
 Combine this transformation with another transformation on the left side. More...
 
CVector2d GetInvertedApply (const CVector2d &position) const
 Inverted operation to GetApply(). More...
 
bool GetInvertedApply (const CVector2d &position, CVector2d &result) const
 Inverted operation to GetApply(). More...
 
CAffine2d GetTranslated (const CVector2d &delta) const
 Get some transformation combined with translation. More...
 
void GetTranslated (const CVector2d &delta, CAffine2d &result) const
 Get some transformation combined with translation. More...
 
void Translate (const CVector2d &delta)
 Combine this transformation with translation. More...
 
CAffine2d GetInverted () const
 Get inverted transformation. More...
 
bool GetInverted (CAffine2d &result) const
 Get inverted transformation. More...
 
bool Serialize (iser::IArchive &archive)
 Serialize transformation parameters into/from archive. More...
 
bool operator== (const CAffine2d &transform) const
 
bool operator!= (const CAffine2d &transform) const
 
CAffine2doperator= (const CAffine2d &transform)
 

Static Public Member Functions

static const CAffine2dGetIdentity ()
 

Detailed Description

This class defines an affine 2D-transformation.

Definition at line 17 of file CAffine2d.h.

Constructor & Destructor Documentation

i2d::CAffine2d::CAffine2d ( )
inline

Constructor, parameters will be not initialized.

Definition at line 201 of file CAffine2d.h.

Referenced by GetTranslated().

i2d::CAffine2d::CAffine2d ( const CAffine2d transform)
inline

Copy constructor, transformation data will be copied from the input object.

Definition at line 208 of file CAffine2d.h.

i2d::CAffine2d::CAffine2d ( const CMatrix2d deform,
const CVector2d translation = CVector2d(0.0, 0.0) 
)
explicit

Constructs a transform using specified deformation matrix and translation.

i2d::CAffine2d::CAffine2d ( const CVector2d translation)
explicit

Constructs a transform with translation only.

Member Function Documentation

void i2d::CAffine2d::Apply ( const CAffine2d transform)

Combine this transformation with another transformation.

Parameters
transformlocal transformation used on right side of transformation multiplication.

Referenced by iview::CScreenTransform::Apply().

void i2d::CAffine2d::ApplyLeft ( const CAffine2d transform)

Combine this transformation with another transformation on the left side.

Parameters
transformlocal transformation used on left side of transformation multiplication.
CVector2d i2d::CAffine2d::GetApply ( const CVector2d position) const
inline

Calculate transformed position.

Definition at line 257 of file CAffine2d.h.

References i2d::CMatrix2d::GetMultiplied().

Referenced by iview::CScreenTransform::GetClientPosition().

void i2d::CAffine2d::GetApply ( const CVector2d position,
CVector2d result 
) const
inline

Get position after this transformation.

Definition at line 266 of file CAffine2d.h.

References i2d::CMatrix2d::GetMultiplied().

CAffine2d i2d::CAffine2d::GetApply ( const CAffine2d transform) const

Get combined transformation.

Parameters
transformlocal transformation used on the right side of transformation multiplication.
Returns
combined transform.
void i2d::CAffine2d::GetApply ( const CAffine2d transform,
CAffine2d result 
) const

Get combined transformation.

Parameters
transformlocal transformation used on the right side of transformation multiplication.
Returns
combined transformation, it is equal to thisTranform * parameterTransform.
CVector2d i2d::CAffine2d::GetApplyToDelta ( const CVector2d delta) const
inline

Get difference vector after this transformation.

Please note that the translation will be not considered for this transformation.

Definition at line 273 of file CAffine2d.h.

References i2d::CMatrix2d::GetMultiplied().

void i2d::CAffine2d::GetApplyToDelta ( const CVector2d delta,
CVector2d result 
) const
inline

Get vector after this transformation.

Please note that the translation will be not considered for this transformation.

Definition at line 283 of file CAffine2d.h.

References i2d::CMatrix2d::GetMultiplied().

const CMatrix2d & i2d::CAffine2d::GetDeformMatrix ( ) const
inline

Get rotation, skew and scale part of this affine transformation.

Definition at line 229 of file CAffine2d.h.

Referenced by i2d::CParallelogram::GetDeformMatrix().

CMatrix2d & i2d::CAffine2d::GetDeformMatrixRef ( )
inline

Get internal reference to the transformation matrix.

Definition at line 249 of file CAffine2d.h.

Referenced by GetTranslated().

const CAffine2d & i2d::CAffine2d::GetIdentity ( )
inlinestatic

Definition at line 344 of file CAffine2d.h.

CAffine2d i2d::CAffine2d::GetInverted ( ) const
inline

Get inverted transformation.

Definition at line 318 of file CAffine2d.h.

Referenced by iview::CScreenTransform::CalculateInvert().

bool i2d::CAffine2d::GetInverted ( CAffine2d result) const

Get inverted transformation.

CVector2d i2d::CAffine2d::GetInvertedApply ( const CVector2d position) const
inline

Inverted operation to GetApply().

Definition at line 308 of file CAffine2d.h.

bool i2d::CAffine2d::GetInvertedApply ( const CVector2d position,
CVector2d result 
) const

Inverted operation to GetApply().

CAffine2d i2d::CAffine2d::GetTranslated ( const CVector2d delta) const
inline

Get some transformation combined with translation.

Definition at line 289 of file CAffine2d.h.

References CAffine2d().

void i2d::CAffine2d::GetTranslated ( const CVector2d delta,
CAffine2d result 
) const
inline

Get some transformation combined with translation.

Definition at line 295 of file CAffine2d.h.

References GetDeformMatrixRef(), and GetTranslationRef().

const CVector2d & i2d::CAffine2d::GetTranslation ( ) const
inline

Get translation part of this affine transformation.

Definition at line 217 of file CAffine2d.h.

CVector2d & i2d::CAffine2d::GetTranslationRef ( )
inline

Get internal reference to the translation vector.

Definition at line 243 of file CAffine2d.h.

Referenced by GetTranslated().

bool i2d::CAffine2d::operator!= ( const CAffine2d transform) const
inline

Definition at line 336 of file CAffine2d.h.

CAffine2d& i2d::CAffine2d::operator= ( const CAffine2d transform)
bool i2d::CAffine2d::operator== ( const CAffine2d transform) const
inline

Definition at line 330 of file CAffine2d.h.

void i2d::CAffine2d::Reset ( )

Set to identity transformation.

Referenced by iview::CScreenTransform::Reset().

void i2d::CAffine2d::Reset ( const CVector2d translation)

Set this transformation to translation.

void i2d::CAffine2d::Reset ( const CVector2d translation,
double  angle,
double  scale = 1.0 
)

Set this transformation to a given translation, rotation and scaling.

void i2d::CAffine2d::Reset ( const CVector2d translation,
double  angle,
const CVector2d scale 
)

Set this transformation to a given translation, rotation and both axis scaling.

bool i2d::CAffine2d::Serialize ( iser::IArchive archive)

Serialize transformation parameters into/from archive.

void i2d::CAffine2d::SetDeformMatrix ( const CMatrix2d deform)
inline

Set rotation, skew and scale part of this affine transformation.

Definition at line 235 of file CAffine2d.h.

Referenced by i2d::CParallelogram::SetDeformMatrix().

void i2d::CAffine2d::SetTranslation ( const CVector2d translation)
inline

Set translation part of this affine transformation.

Definition at line 223 of file CAffine2d.h.

void i2d::CAffine2d::Translate ( const CVector2d delta)
inline

Combine this transformation with translation.

Definition at line 302 of file CAffine2d.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy