CArc.h
Go to the documentation of this file.
1 #ifndef i2d_CArc_included
2 #define i2d_CArc_included
3 
4 
5 // Acf includes
6 #include <i2d/CCircle.h>
7 
8 
9 namespace i2d
10 {
11 
12 
13 class CArc: public CCircle
14 {
15 public:
16  typedef CCircle BaseClass;
17 
18  CArc();
19  CArc(double startAngle, double endAngle, const double radius, const CVector2d& center);
20 
21  double GetStartAngle() const;
22  void SetStartAngle(double angle);
23 
24  double GetEndAngle() const;
25  void SetEndAngle(double angle);
26 
27  bool operator==(const CArc& arc) const;
28  bool operator!=(const CArc& arc) const;
29 
34  CVector2d GetPositionFromAlpha(double alpha) const;
35 
36  // reimplemented (i2d::IObject2d)
37  virtual CRectangle GetBoundingBox() const;
38  virtual bool Transform(
39  const ITransformation2d& transformation,
41  double* errorFactorPtr = NULL);
42  virtual bool InvTransform(
43  const ITransformation2d& transformation,
45  double* errorFactorPtr = NULL);
46  virtual bool GetTransformed(
47  const ITransformation2d& transformation,
48  IObject2d& result,
50  double* errorFactorPtr = NULL) const;
51  virtual bool GetInvTransformed(
52  const ITransformation2d& transformation,
53  IObject2d& result,
55  double* errorFactorPtr = NULL) const;
56 
57  // reimplemented istd::IChangeable
58  virtual int GetSupportedOperations() const;
59  virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS);
61 
62  // reimplemented (iser::ISerializable)
63  virtual bool Serialize(iser::IArchive& archive);
64 
65 protected:
66  double m_startAngle;
67  double m_endAngle;
68 };
69 
70 
71 // public inline methods
72 
73 inline double CArc::GetStartAngle() const
74 {
75  return m_startAngle;
76 }
77 
78 
79 inline double CArc::GetEndAngle() const
80 {
81  return m_endAngle;
82 }
83 
84 
85 } // namespace i2d
86 
87 
88 #endif // !i2d_CArc_included
89 
90 
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.
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
double GetEndAngle() const
Definition: CArc.h:79
Common interface for all calibration objects.
virtual bool InvTransform(const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL)
Do inverse transformation of this object.
CVector2d GetPositionFromAlpha(double alpha) const
Get position of point using normed 'alpha' value.
double m_startAngle
Definition: CArc.h:66
CCircle BaseClass
Definition: CArc.h:16
virtual int GetSupportedOperations() const
Get set of flags for supported operations.
There are no preferences, should be automatically selected.
double m_endAngle
Definition: CArc.h:67
Represent input/output persistence archive.
Definition: IArchive.h:30
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
void SetEndAngle(double angle)
Definition of rectangle area orthogonal to axis of coordination system.
Definition: CRectangle.h:26
void SetStartAngle(double angle)
virtual istd::IChangeable * CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const
Make a copy of this object.
Definition of position or mathematical vector on 2D plane.
Definition: CVector2d.h:28
virtual bool Transform(const ITransformation2d &transformation, ITransformation2d::ExactnessMode mode=ITransformation2d::EM_NONE, double *errorFactorPtr=NULL)
Transform this object using some transformation.
Definition of graphical circle object.
Definition: CCircle.h:21
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
#define NULL
Definition: istd.h:64
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS)
Definition: CArc.h:13
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.
Common interface for describing the 2D-objects.
Definition: IObject2d.h:22
bool operator!=(const CArc &arc) const
virtual CRectangle GetBoundingBox() const
Get bounding box of this shape.
double GetStartAngle() const
Definition: CArc.h:73
bool operator==(const CArc &arc) const

© 2007-2017 Witold Gantzke and Kirill Lepskiy