CAnnulus.h
Go to the documentation of this file.
1 #ifndef i2d_CAnnulus_included
2 #define i2d_CAnnulus_included
3 
4 
5 #include <i2d/CPosition2d.h>
6 #include <i2d/CCircle.h>
7 #include <i2d/CRectangle.h>
8 
9 
10 namespace i2d
11 {
12 
13 
19 class CAnnulus: public CPosition2d
20 {
21 public:
23 
27  CAnnulus();
28 
32  CAnnulus(const i2d::CVector2d& center, double innerRadius, double outerRadius);
33 
39  bool IsAnnulusValid() const;
40 
44  double GetInnerRadius() const;
45 
49  void SetInnerRadius(double innerRadius);
50 
54  double GetOuterRadius() const;
55 
59  void SetOuterRadius(double outerRadius);
60 
64  void SetInnerOuterRadius(double radius1, double radius2);
65 
69  CCircle GetInnerCircle() const;
70 
74  CCircle GetOuterCircle() const;
75 
79  bool operator == (const CAnnulus & annulus) const;
80 
84  bool operator != (const CAnnulus & annulus) const;
85 
90  bool ConvertToPolygon(i2d::CPolygon& result, int segmentsCount = 0) const;
91 
92  // reimplemented (i2d::IObject2d)
93  virtual CRectangle GetBoundingBox() const;
94  virtual bool Transform(
95  const ITransformation2d& transformation,
97  double* errorFactorPtr = NULL);
98  virtual bool InvTransform(
99  const ITransformation2d& transformation,
101  double* errorFactorPtr = NULL);
102  virtual bool GetTransformed(
103  const ITransformation2d& transformation,
104  IObject2d& result,
106  double* errorFactorPtr = NULL) const;
107  virtual bool GetInvTransformed(
108  const ITransformation2d& transformation,
109  IObject2d& result,
111  double* errorFactorPtr = NULL) const;
112 
113  // reimplemented (istd::IChangeable)
114  virtual int GetSupportedOperations() const;
115  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
117 
118  // reimplemented (iser::ISerializable)
119  virtual bool Serialize(iser::IArchive& archive);
120 
121 protected:
123 };
124 
125 
126 } // namespace i2d
127 
128 
129 #endif // !i2d_CAnnulus_included
130 
131 
Definition of the data model for a polygon.
Definition: CPolygon.h:16
bool IsAnnulusValid() const
Check, if the annulus is valid.
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
void SetOuterRadius(double outerRadius)
Set the outer radius of the annulus.
void SetInnerRadius(double innerRadius)
Set the inner radius of the annulus.
virtual istd::IChangeable * CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const
Make a copy of this object.
bool ConvertToPolygon(i2d::CPolygon &result, int segmentsCount=0) const
Performs conversion of the annulus splitting it to segmentsCount segments to the polygon result...
Common interface for all calibration objects.
bool operator!=(const CAnnulus &annulus) const
Compare with another annulus.
virtual bool Transform(const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL)
Transform this object using some transformation.
void SetInnerOuterRadius(double radius1, double radius2)
Set the inner and outer radius of the annulus.
double GetOuterRadius() const
Get the outer radius of the annulus.
Definition of graphical annulus object.
Definition: CAnnulus.h:19
There are no preferences, should be automatically selected.
CAnnulus()
Construct an empty annulus object.
Represent input/output persistence archive.
Definition: IArchive.h:30
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
Definition of rectangle area orthogonal to axis of coordination system.
Definition: CRectangle.h:26
virtual bool GetTransformed(const ITransformation2d &transformation, IObject2d &result, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const
Calulate transformation of the object into second one.
virtual CRectangle GetBoundingBox() const
Get bounding box of this shape.
Definition of position or mathematical vector on 2D plane.
Definition: CVector2d.h:28
double GetInnerRadius() const
Get the inner radius of the annulus.
Definition of graphical circle object.
Definition: CCircle.h:21
i2d::CPosition2d BaseClass
Definition: CAnnulus.h:22
virtual bool InvTransform(const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL)
Do inverse transformation of this object.
#define NULL
Definition: istd.h:64
CCircle GetOuterCircle() const
Set the outer circle of the annulus object.
Common interface for describing the 2D-objects.
Definition: IObject2d.h:22
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
CCircle GetInnerCircle() const
Set the inner circle of the annulus object.
istd::CRange m_radiusRange
Definition: CAnnulus.h:122
virtual bool GetInvTransformed(const ITransformation2d &transformation, IObject2d &result, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL) const
Calulate inverse transformation of the object into second one.
virtual int GetSupportedOperations() const
Get set of flags for supported operations.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
Definition of graphical point object.
Definition: CPosition2d.h:17
bool operator==(const CAnnulus &annulus) const
Compare with another annulus.

© 2007-2017 Witold Gantzke and Kirill Lepskiy