![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Definition of an affine transformation for 2D-spaces. More...
#include <CAffineTransformation2d.h>
Public Member Functions | |
CAffineTransformation2d () | |
CAffineTransformation2d (const i2d::CAffine2d &transformation) | |
const i2d::CAffine2d & | GetTransformation () const |
Get used transformation object. | |
i2d::CAffine2d & | GetTransformationRef () |
Get reference to internal transformation object. | |
void | SetTransformation (const i2d::CAffine2d &transformation) |
Set the transformation object. | |
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, bool isPosDef=true) |
Set this transformation to translation, rotation and scaling. | |
void | Reset (const CVector2d &translation, double angle, const CVector2d &scale, bool isPosDef=true) |
Set this transformation to translation, rotation and both axis scaling. | |
int | GetTransformationFlags () const override |
Get flags of describing type of this transformation. | |
bool | GetDistance (const CVector2d &origPos1, const CVector2d &origPos2, double &result, ExactnessMode mode=EM_NONE) const override |
Compute a shortness distance in transformed coordinations. | |
bool | GetPositionAt (const CVector2d &origPosition, CVector2d &result, ExactnessMode mode=EM_NONE) const override |
Get position after transformation. | |
bool | GetInvPositionAt (const CVector2d &transfPosition, CVector2d &result, ExactnessMode mode=EM_NONE) const override |
Get position after transformation. | |
bool | GetLocalTransform (const CVector2d &origPosition, CAffine2d &result, ExactnessMode mode=EM_NONE) const override |
Get local transformation (from original to transformed coordinate system) at some original position. | |
bool | GetLocalInvTransform (const CVector2d &transfPosition, CAffine2d &result, ExactnessMode mode=EM_NONE) const override |
Get local transformation (from transformed to original coordinate system) at some transformed position. | |
bool | GetInvValueAt (const CVector2d &argument, CVector2d &result) const override |
CVector2d | GetInvValueAt (const CVector2d &argument) const override |
bool | GetValueAt (const CVector2d &argument, CVector2d &result) const override |
CVector2d | GetValueAt (const CVector2d &argument) const override |
bool | Serialize (iser::IArchive &archive) override |
Load or store state of this object as a archive stream. | |
bool | CopyFrom (const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override |
Copy this object from another one. | |
std::unique_ptr< istd::IChangeable > | CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const override |
Make a copy of this object. | |
![]() | |
![]() | |
virtual bool | GetInvValueAt (const CVector2d &argument, CVector2d &result) const=0 |
Get inverted function value. | |
virtual CVector2d | GetInvValueAt (const CVector2d &argument) const=0 |
Get inverted function value. | |
![]() | |
virtual bool | GetValueAt (const CVector2d &argument, CVector2d &result) const=0 |
Get function value for specified argument value. | |
virtual CVector2d | GetValueAt (const CVector2d &argument) const=0 |
Get function value for specified argument value. | |
![]() | |
virtual quint32 | GetMinimalVersion (int versionId) const |
Get minimal needed version to correct storing of this data. | |
![]() | |
virtual int | GetSupportedOperations () const |
Get set of flags for supported operations. | |
virtual bool | IsEqual (const IChangeable &object) const |
Compare this object with another object. | |
virtual bool | ResetData (CompatibilityMode mode=CM_WITHOUT_REFS) |
Reset data to its default state. | |
virtual QMutex * | GetChangesLock () const |
Get mutex beeing locked during changes, if available. | |
virtual void | BeginChanges (const ChangeSet &changeSet) |
Starts the change transaction. | |
virtual void | EndChanges (const ChangeSet &changeSet) |
Ends the change transaction. | |
virtual void | BeginChangeGroup (const ChangeSet &changeSet) |
Starts group of changes. | |
virtual void | EndChangeGroup (const ChangeSet &changeSet) |
Ends group of changes. | |
Protected Attributes | |
CAffine2d | m_transformation |
Additional Inherited Members | |
![]() | |
enum | ExactnessMode { EM_NONE , EM_EXACT , EM_VISUAL , EM_ANY } |
enum | TransformationFlags { TF_FORWARD = 1 << 0 , TF_INVERTED = 1 << 1 , TF_INJECTIVE = 1 << 2 , TF_SURJECTIVE = 1 << 3 , TF_PRESERVE_NULL = 1 << 4 , TF_PRESERVE_DISTANCE = 1 << 5 , TF_PRESERVE_ANGLE = 1 << 6 , TF_AFFINE = 1 << 7 , TF_CONTINUES = 1 << 8 } |
Flags indication type of this transformation and supported operations. More... | |
![]() | |
typedef CVector2d | ArgumentType |
typedef CVector2d | ResultType |
![]() | |
enum | ChangeFlags { CF_ICF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING , CF_DELEGATED , CF_NO_UNDO } |
Data model change notification flags. More... | |
enum | SupportedOperations { SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 , SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4 , SO_CHANGE_LOCK = 1 << 5 } |
Flags for supported operations. More... | |
enum | CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT } |
Control how relationship betweeen objects are interpreted. More... | |
![]() | |
static const ChangeSet & | GetNoChanges () |
Get empty set of changes. | |
static const ChangeSet & | GetAnyChange () |
Get anonymous change set. | |
static const ChangeSet & | GetAllChanges () |
Get anonymous change set. | |
static const ChangeSet & | GetDelegatedChanges () |
Get delegated change set. | |
![]() | |
virtual void | OnBeginChanges () |
Callback function for begin change event. | |
virtual void | OnEndChanges (const ChangeSet &changeSet) |
Callback function for end change event. | |
Definition of an affine transformation for 2D-spaces.
Definition at line 21 of file CAffineTransformation2d.h.
i2d::CAffineTransformation2d::CAffineTransformation2d | ( | ) |
|
explicit |
|
overridevirtual |
Make a copy of this object.
You may check, if this functionality is supported over GetSupportedOperations()
.
Reimplemented from istd::IChangeable.
|
overridevirtual |
Copy this object from another one.
Default implementation in istd::IChangeable does nothing. You may check, if this functionality is supported over GetSupportedOperations()
.
Reimplemented from istd::IChangeable.
|
overridevirtual |
Compute a shortness distance in transformed coordinations.
origPos1 | first position in original coordinates. |
origPos2 | second position in original coordinates. |
result | object where result distance between positions in transformed coordinates will be stored. |
mode | controls needed transformation exactness. |
Implements i2d::ITransformation2d.
|
overridevirtual |
Get position after transformation.
transfPosition | position in transformed coordination system. |
result | result position (original coordination system). |
mode | controls needed transformation exactness. |
Implements i2d::ITransformation2d.
|
override |
|
overridevirtual |
Get local transformation (from transformed to original coordinate system) at some transformed position.
transfPosition | position in transformed coordination system. |
result | inverse transformation for specified position. |
mode | controls needed transformation exactness. |
Implements i2d::ITransformation2d.
|
overridevirtual |
Get local transformation (from original to transformed coordinate system) at some original position.
origPosition | position in (original coordination system). |
result | transformation for specified position. |
mode | controls needed transformation exactness. |
Implements i2d::ITransformation2d.
|
overridevirtual |
Get position after transformation.
origPosition | position in (original coordination system). |
result | result position (transformed coordination system). |
mode | controls needed transformation exactness. |
Implements i2d::ITransformation2d.
|
inline |
Get used transformation object.
Definition at line 118 of file CAffineTransformation2d.h.
References m_transformation.
|
overridevirtual |
Get flags of describing type of this transformation.
Implements i2d::ITransformation2d.
|
inline |
Get reference to internal transformation object.
Please don forgot the update notifying.
Definition at line 124 of file CAffineTransformation2d.h.
References m_transformation.
|
override |
void i2d::CAffineTransformation2d::Reset | ( | ) |
Set to identity transformation.
void i2d::CAffineTransformation2d::Reset | ( | const CVector2d & | translation | ) |
Set this transformation to translation.
void i2d::CAffineTransformation2d::Reset | ( | const CVector2d & | translation, |
double | angle, | ||
const CVector2d & | scale, | ||
bool | isPosDef = true ) |
Set this transformation to translation, rotation and both axis scaling.
translation | translation of transformation. |
angle | angle of transformation. |
scale | scale of both axis of transformation. |
isPosDef | indicate if the matrix of transformation is positive-defined, if not than the vertical direction will be mirrored. |
void i2d::CAffineTransformation2d::Reset | ( | const CVector2d & | translation, |
double | angle, | ||
double | scale = 1.0, | ||
bool | isPosDef = true ) |
Set this transformation to translation, rotation and scaling.
translation | translation of transformation. |
angle | angle of transformation. |
scale | scale of both axis of transformation. |
isPosDef | indicate if the matrix of transformation is positive-defined, if not than the vertical direction will be mirrored. |
|
overridevirtual |
Load or store state of this object as a archive stream.
Type of operation is depending on archive type.
Implements iser::ISerializable.
void i2d::CAffineTransformation2d::SetTransformation | ( | const i2d::CAffine2d & | transformation | ) |
Set the transformation object.
|
protected |
Definition at line 112 of file CAffineTransformation2d.h.
Referenced by GetTransformation(), and GetTransformationRef().
© Witold Gantzke and Kirill Lepskiy