108 CVector2d
GetApply(
const CVector2d& position)
const;
113 void GetApply(
const CVector2d& position, CVector2d& result)
const;
213: m_translation(0.0, 0.0),
220: m_translation(transform.m_translation),
221 m_deformMatrix(transform.m_deformMatrix)
230 return m_translation;
236 m_translation = translation;
242 return m_deformMatrix;
248 m_deformMatrix = deform;
256 return m_translation;
262 return m_deformMatrix;
273 return result + m_translation;
280 result += m_translation;
302 return CAffine2d(m_deformMatrix, m_translation + vector);
315 m_translation += vector;
343 return (m_translation == transform.m_translation) && (m_deformMatrix == transform.m_deformMatrix);
349 return (m_translation != transform.m_translation) || (m_deformMatrix != transform.m_deformMatrix);
This class defines an affine 2D-transformation.
const CVector2d & GetTranslation() const
Get translation part of this affine transformation.
CVector2d & GetTranslationRef()
Get internal reference to the translation vector.
CAffine2d & operator=(const CAffine2d &transform)
void Reset()
Set to identity transformation.
void ApplyLeft(const CAffine2d &transform)
Combine this transformation with another transformation on the left side.
CAffine2d GetTranslated(const CVector2d &delta) const
Get some transformation combined with translation.
bool operator!=(const CAffine2d &transform) const
void SetDeformMatrix(const CMatrix2d &deform)
Set rotation, skew and scale part of this affine transformation.
const CMatrix2d & GetDeformMatrix() 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,...
bool operator==(const CAffine2d &transform) const
bool GetInvertedApply(const CVector2d &position, CVector2d &result) const
Inverted operation to GetApply().
void Reset(const CVector2d &translation, double angle, double scale=1.0)
Set this transformation to a given translation, rotation and scaling.
CVector2d GetApplyToDelta(const CVector2d &delta) const
Get difference vector after this transformation.
CMatrix2d GetRotationMatrix() const
Get rotational part of this affine transformation.
void Reset(const CVector2d &translation, double angle, const CVector2d &scale)
Set this transformation to a given translation, rotation and both axis scaling.
void Reset(const CVector2d &translation)
Set this transformation to translation.
CVector2d GetApply(const CVector2d &position) const
Calculate transformed position.
CAffine2d()
Constructor, parameters will be not initialized.
void GetApply(const CAffine2d &transform, CAffine2d &result) const
Get combined transformation.
void Apply(const CAffine2d &transform)
Combine this transformation with another transformation.
static const CAffine2d & GetIdentity()
CAffine2d(const CMatrix2d &deform, const CVector2d &translation=CVector2d(0.0, 0.0))
Constructs a transform using specified deformation matrix and translation.
bool Serialize(iser::IArchive &archive)
Serialize transformation parameters into/from archive.
CAffine2d GetInverted() const
Get inverted transformation.
void Translate(const CVector2d &delta)
Combine this transformation with translation.
bool GetInverted(CAffine2d &result) const
Get inverted transformation.
void SetTranslation(const CVector2d &translation)
Set translation part of this affine transformation.
CMatrix2d & GetDeformMatrixRef()
Get internal reference to the transformation matrix.
CAffine2d GetApply(const CAffine2d &transform) const
Get combined transformation.
CVector2d GetInvertedApply(const CVector2d &position) const
Inverted operation to GetApply().
CAffine2d(const CVector2d &translation)
Constructs a transform with translation only.
CVector2d GetMultiplied(const CVector2d &position) const
Definition of position or mathematical vector on 2D plane.
Represents an input/output persistence archive for object serialization.