ITransformation2d.h
Go to the documentation of this file.
1 #ifndef i2d_ITransformation2d_included
2 #define i2d_ITransformation2d_included
3 
4 
5 // ACF includes
6 #include <iser/ISerializable.h>
7 
9 
10 #include <i2d/CVector2d.h>
11 #include <i2d/CMatrix2d.h>
12 
13 
14 namespace i2d
15 {
16 
17 
18 class CAffine2d;
19 
20 
28  virtual public imath::TISurjectFunction<CVector2d, CVector2d>,
29  virtual public iser::ISerializable
30 {
31 public:
33  {
50  };
51 
56  {
60  TF_FORWARD = 1 << 0,
64  TF_INVERTED = 1 << 1,
68  TF_INJECTIVE = 1 << 2,
72  TF_SURJECTIVE = 1 << 3,
76  TF_PRESERVE_NULL = 1 << 4,
88  TF_AFFINE = 1 << 7,
92  TF_CONTINUES = 1 << 8
93  };
94 
98  virtual int GetTransformationFlags() const = 0;
99 
108  virtual bool GetDistance(
109  const CVector2d& origPos1,
110  const CVector2d& origPos2,
111  double& result,
112  ExactnessMode mode = EM_NONE) const = 0;
113 
121  virtual bool GetPositionAt(
122  const CVector2d& origPosition,
123  CVector2d& result,
124  ExactnessMode mode = EM_NONE) const = 0;
125 
133  virtual bool GetInvPositionAt(
134  const CVector2d& transfPosition,
135  CVector2d& result,
136  ExactnessMode mode = EM_NONE) const = 0;
137 
145  virtual bool GetLocalTransform(
146  const CVector2d& origPosition,
147  CAffine2d& result,
148  ExactnessMode mode = EM_NONE) const = 0;
149 
157  virtual bool GetLocalInvTransform(
158  const CVector2d& transfPosition,
159  CAffine2d& result,
160  ExactnessMode mode = EM_NONE) const = 0;
161 };
162 
163 
164 } // namespace i2d
165 
166 
167 #endif // !i2d_ITransformation2d_included
168 
169 
TransformationFlags
Flags indication type of this transformation and supported operations.
virtual bool GetDistance(const CVector2d &origPos1, const CVector2d &origPos2, double &result, ExactnessMode mode=EM_NONE) const =0
Compute a shortness distance in transformed coordinations.
Only precise calculation should be done.
virtual bool GetPositionAt(const CVector2d &origPosition, CVector2d &result, ExactnessMode mode=EM_NONE) const =0
Get position after transformation.
virtual bool GetLocalTransform(const CVector2d &origPosition, CAffine2d &result, ExactnessMode mode=EM_NONE) const =0
Get local transformation (from original to transformed coordinate system) at some original position...
This transformation preserve angles.
Common interface for all calibration objects.
This is affine transformation.
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
Function in surjective, it means there is at least one input value for each outputs.
virtual bool GetLocalInvTransform(const CVector2d &transfPosition, CAffine2d &result, ExactnessMode mode=EM_NONE) const =0
Get local transformation (from transformed to original coordinate system) at some transformed positio...
There are no preferences, should be automatically selected.
This transformation is represented by continues function.
virtual int GetTransformationFlags() const =0
Get flags of describing type of this transformation.
Function in injective, it means for each input values the output value is defined.
Definition of position or mathematical vector on 2D plane.
Definition: CVector2d.h:28
There are some arguments (inputs) where the transformation function is defined.
virtual bool GetInvPositionAt(const CVector2d &transfPosition, CVector2d &result, ExactnessMode mode=EM_NONE) const =0
Get position after transformation.
Only visual similarity of transformation is important.
This transformation preserve position [0, 0].
Template interface for any surjective mathematical function.
This class defines an affine 2D-transformation.
Definition: CAffine2d.h:17
There are some outputs where the inverted transformation is defined.
This transformation preserve distance.
It is only important to output some result.

© 2007-2017 Witold Gantzke and Kirill Lepskiy