ACF $AcfVersion:0$
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.
 
 CAffine2d (const CAffine2d &transform)
 Copy constructor, transformation data will be copied from the input object.
 
 CAffine2d (const CMatrix2d &deform, const CVector2d &translation=CVector2d(0.0, 0.0))
 Constructs a transform using specified deformation matrix and translation.
 
 CAffine2d (const CVector2d &translation)
 Constructs a transform with translation only.
 
const CVector2dGetTranslation () const
 Get translation part of this affine transformation.
 
void SetTranslation (const CVector2d &translation)
 Set translation part of this affine transformation.
 
const CMatrix2dGetDeformMatrix () const
 Get rotation, skew and scale part of this affine transformation.
 
CVector2d GetScaleVector () const
 Get scale vector of this affine transformation (right-hand side matrix-vector multiplication assumed, i.e.
 
CMatrix2d GetRotationMatrix () const
 Get rotational part of this affine transformation.
 
void SetDeformMatrix (const CMatrix2d &deform)
 Set rotation, skew and scale part of this affine transformation.
 
CVector2dGetTranslationRef ()
 Get internal reference to the translation vector.
 
CMatrix2dGetDeformMatrixRef ()
 Get internal reference to the transformation matrix.
 
void Reset ()
 Set to identity transformation.
 
void Reset (const CVector2d &translation)
 Set this transformation to translation.
 
void Reset (const CVector2d &translation, double angle, double scale=1.0)
 Set this transformation to a given translation, rotation and scaling.
 
void Reset (const CVector2d &translation, double angle, const CVector2d &scale)
 Set this transformation to a given translation, rotation and both axis scaling.
 
CVector2d GetApply (const CVector2d &position) const
 Calculate transformed position.
 
void GetApply (const CVector2d &position, CVector2d &result) const
 Get position after this transformation.
 
CVector2d GetApplyToDelta (const CVector2d &delta) const
 Get difference vector after this transformation.
 
void GetApplyToDelta (const CVector2d &delta, CVector2d &result) const
 Get vector after this transformation.
 
CAffine2d GetApply (const CAffine2d &transform) const
 Get combined transformation.
 
void GetApply (const CAffine2d &transform, CAffine2d &result) const
 Get combined transformation.
 
void Apply (const CAffine2d &transform)
 Combine this transformation with another transformation.
 
void ApplyLeft (const CAffine2d &transform)
 Combine this transformation with another transformation on the left side.
 
CVector2d GetInvertedApply (const CVector2d &position) const
 Inverted operation to GetApply().
 
bool GetInvertedApply (const CVector2d &position, CVector2d &result) const
 Inverted operation to GetApply().
 
CAffine2d GetTranslated (const CVector2d &delta) const
 Get some transformation combined with translation.
 
void GetTranslated (const CVector2d &delta, CAffine2d &result) const
 Get some transformation combined with translation.
 
void Translate (const CVector2d &delta)
 Combine this transformation with translation.
 
CAffine2d GetInverted () const
 Get inverted transformation.
 
bool GetInverted (CAffine2d &result) const
 Get inverted transformation.
 
bool Serialize (iser::IArchive &archive)
 Serialize transformation parameters into/from archive.
 
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

◆ CAffine2d() [1/4]

i2d::CAffine2d::CAffine2d ( )
inline

Constructor, parameters will be not initialized.

Definition at line 212 of file CAffine2d.h.

Referenced by GetTranslated().

◆ CAffine2d() [2/4]

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

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

Definition at line 219 of file CAffine2d.h.

◆ CAffine2d() [3/4]

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

Constructs a transform using specified deformation matrix and translation.

◆ CAffine2d() [4/4]

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

Constructs a transform with translation only.

Member Function Documentation

◆ Apply()

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().

◆ ApplyLeft()

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.

◆ GetApply() [1/4]

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.

◆ GetApply() [2/4]

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.

◆ GetApply() [3/4]

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

Calculate transformed position.

Definition at line 268 of file CAffine2d.h.

References i2d::CMatrix2d::GetMultiplied().

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

◆ GetApply() [4/4]

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

Get position after this transformation.

Definition at line 277 of file CAffine2d.h.

References i2d::CMatrix2d::GetMultiplied().

◆ GetApplyToDelta() [1/2]

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 284 of file CAffine2d.h.

References i2d::CMatrix2d::GetMultiplied().

◆ GetApplyToDelta() [2/2]

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 294 of file CAffine2d.h.

References i2d::CMatrix2d::GetMultiplied().

◆ GetDeformMatrix()

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

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

Definition at line 240 of file CAffine2d.h.

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

◆ GetDeformMatrixRef()

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

Get internal reference to the transformation matrix.

Definition at line 260 of file CAffine2d.h.

Referenced by GetTranslated().

◆ GetIdentity()

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

Definition at line 355 of file CAffine2d.h.

◆ GetInverted() [1/2]

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

Get inverted transformation.

Definition at line 329 of file CAffine2d.h.

References GetInverted().

Referenced by iview::CScreenTransform::CalculateInvert(), and GetInverted().

◆ GetInverted() [2/2]

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

Get inverted transformation.

◆ GetInvertedApply() [1/2]

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

Inverted operation to GetApply().

Definition at line 319 of file CAffine2d.h.

References GetInvertedApply().

Referenced by GetInvertedApply().

◆ GetInvertedApply() [2/2]

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

Inverted operation to GetApply().

◆ GetRotationMatrix()

CMatrix2d i2d::CAffine2d::GetRotationMatrix ( ) const

Get rotational part of this affine transformation.

◆ GetScaleVector()

CVector2d i2d::CAffine2d::GetScaleVector ( ) const

Get scale vector of this affine transformation (right-hand side matrix-vector multiplication assumed, i.e.

deformation matrix D = R * S. Here D is the deformation matrix, R - rotation matrix, S - scale diagonal matrix

◆ GetTranslated() [1/2]

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

Get some transformation combined with translation.

Definition at line 300 of file CAffine2d.h.

References CAffine2d().

◆ GetTranslated() [2/2]

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

Get some transformation combined with translation.

Definition at line 306 of file CAffine2d.h.

References GetDeformMatrixRef(), and GetTranslationRef().

◆ GetTranslation()

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

Get translation part of this affine transformation.

Definition at line 228 of file CAffine2d.h.

◆ GetTranslationRef()

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

Get internal reference to the translation vector.

Definition at line 254 of file CAffine2d.h.

Referenced by GetTranslated().

◆ operator!=()

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

Definition at line 347 of file CAffine2d.h.

◆ operator=()

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

◆ operator==()

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

Definition at line 341 of file CAffine2d.h.

◆ Reset() [1/4]

void i2d::CAffine2d::Reset ( )

◆ Reset() [2/4]

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

Set this transformation to translation.

◆ Reset() [3/4]

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

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

◆ Reset() [4/4]

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

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

◆ Serialize()

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

Serialize transformation parameters into/from archive.

◆ SetDeformMatrix()

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

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

Definition at line 246 of file CAffine2d.h.

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

◆ SetTranslation()

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

Set translation part of this affine transformation.

Definition at line 234 of file CAffine2d.h.

◆ Translate()

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

Combine this transformation with translation.

Definition at line 313 of file CAffine2d.h.


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