COrientedCircle.h
Go to the documentation of this file.
1 #ifndef i2d_COrientedCircle_included
2 #define i2d_COrientedCircle_included
3 
4 
5 #include <i2d/CCircle.h>
6 
7 
8 namespace i2d
9 {
10 
11 
17 class COrientedCircle: public CCircle
18 {
19 public:
20  typedef CCircle BaseClass;
21 
23  COrientedCircle(double radius, const CVector2d& center, bool orientedOutside);
24 
29  bool IsOrientedOutside() const;
34  void SetOrientedOutside(bool orientedOutside);
35 
36  bool operator==(const COrientedCircle& circle) const;
37  bool operator!=(const COrientedCircle& circle) const;
38 
39  // reimplemented (i2d::CCircle)
40  virtual bool ConvertToPolygon(i2d::CPolygon& result, int segmentsCount = 0) const;
41 
42  // reimplemented (istd::IChangeable)
43  virtual int GetSupportedOperations() const;
44  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
46 
47  // reimplemented (iser::ISerializable)
48  virtual bool Serialize(iser::IArchive& archive);
49 
50 private:
51  bool m_orientedOutside;
52 };
53 
54 
55 // inline methods
56 
58 {
59  return m_orientedOutside;
60 }
61 
62 
63 } // namespace i2d
64 
65 
66 #endif // !i2d_COrientedCircle_included
67 
68 
Definition of the data model for a polygon.
Definition: CPolygon.h:16
Definition of an oriented graphical circle object.
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
Represent input/output persistence archive.
Definition: IArchive.h:30
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
bool operator==(const COrientedCircle &circle) const
Definition of position or mathematical vector on 2D plane.
Definition: CVector2d.h:28
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
Definition of graphical circle object.
Definition: CCircle.h:21
virtual int GetSupportedOperations() const
Get set of flags for supported operations.
void SetOrientedOutside(bool orientedOutside)
Set this circle oriented outside or inside.
virtual istd::IChangeable * CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const
Make a copy of this object.
bool IsOrientedOutside() const
Check if this circle is oriented outside.
bool operator!=(const COrientedCircle &circle) const
virtual bool ConvertToPolygon(i2d::CPolygon &result, int segmentsCount=0) const
Performs conversion of the circle splitting it to segmentsCount segments to the polygon result...

© 2007-2017 Witold Gantzke and Kirill Lepskiy