QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
REllipseData.h
Go to the documentation of this file.
1 
20 #ifndef RELLIPSEDATA_H
21 #define RELLIPSEDATA_H
22 
23 #include "entity_global.h"
24 
25 #include "RBox.h"
26 #include "RDocument.h"
27 #include "REntity.h"
28 #include "RPoint.h"
29 #include "RVector.h"
30 #include "REllipse.h"
31 
40 
41  friend class REllipseEntity;
42 
43 protected:
45 
46 public:
47  REllipseData();
48  REllipseData(const REllipse& ellipse);
50  const RVector& center,
51  const RVector& majorPoint,
52  double ratio,
53  double startParam, double endParam,
54  bool reversed = false);
55 
57  return *this;
58  }
59 
60  QList<RVector> getFoci() const {
61  return REllipse::getFoci();
62  }
63  RVector getCenter() const {
64  return REllipse::getCenter();
65  }
66  double getMajorRadius() const {
67  return REllipse::getMajorRadius();
68  }
70  return REllipse::getMajorPoint();
71  }
73  return REllipse::getMinorPoint();
74  }
75  void setMinorPoint(const RVector& p) {
77  }
78  double getRatio() const {
79  return REllipse::getRatio();
80  }
81  double getAngle() const {
82  return REllipse::getAngle();
83  }
84  double getStartParam() const {
85  return REllipse::getStartParam();
86  }
87  double getEndParam() const {
88  return REllipse::getEndParam();
89  }
90  bool isFullEllipse() const {
91  return REllipse::isFullEllipse();
92  }
93 
94  double getParamTo(const RVector& pos) {
95  return REllipse::getParamTo(pos);
96  }
97 
98  double getLength() const {
99  return REllipse::getLength();
100  }
101 
102  double getSweep() const {
103  return REllipse::getSweep();
104  }
105 
106  RVector getPointAt(double angle) const {
107  return REllipse::getPointAt(angle);
108  }
109 
110  virtual QList<RVector> getReferencePoints(
112 
113  virtual bool moveReferencePoint(const RVector& referencePoint,
114  const RVector& targetPoint);
115 
116  virtual bool reverse() {
117  return REllipse::reverse();
118  }
119 
120  virtual RShape* castToShape() {
121  return this;
122  }
123 
124  virtual QList<QSharedPointer<RShape> > getShapes(const RBox& queryBox = RDEFAULT_RBOX, bool ignoreComplex = false) const {
125  Q_UNUSED(queryBox)
126 
127  return QList<QSharedPointer<RShape> >() <<
128  QSharedPointer<RShape>(new REllipse(*this));
129  }
130 };
131 
134 Q_DECLARE_METATYPE(QSharedPointer<REllipseData>)
135 
136 #endif