OpenIndy-Core  0.2.0.43
ellipsoid.h
Go to the documentation of this file.
1 #ifndef ELLIPSOID_H
2 #define ELLIPSOID_H
3 
4 #include <QObject>
5 #include <QtXml>
6 
7 #include "geometry.h"
8 #include "position.h"
9 #include "direction.h"
10 
11 namespace oi{
12 
18 {
19  Q_OBJECT
20 
21 public:
22  Ellipsoid(const bool &isNominal, QObject *parent = 0);
23  Ellipsoid(const bool &isNominal, const Position &center, const Direction &majorAxis,
24  const double &a, const double &b, QObject *parent = 0);
25 
26  Ellipsoid(const Ellipsoid &copy, QObject *parent = 0);
27 
28  Ellipsoid &operator=(const Ellipsoid &copy);
29 
30  ~Ellipsoid();
31 
32  //########################################
33  //order of unknown parameters (Qxx-matrix)
34  //########################################
35 
37  unknownCenterX = 0,
44  unknownB
45  };
46 
47  //###################################################################
48  //check wether this geometry has a direction, a position and a radius
49  //###################################################################
50 
51  bool hasDirection() const;
52  bool hasPosition() const;
53 
54  //###############################
55  //get or set ellipsoid parameters
56  //###############################
57 
58  const Direction &getDirection() const;
59  const Position &getPosition() const;
60 
61  const double &getA() const;
62  const double &getB() const;
63 
64  void setEllipsoid(const Position &center, const Direction &majorAxis,
65  const double &a, const double &b);
66 
67  //#############################
68  //get or set unknown parameters
69  //#############################
70 
71  virtual QMap<GeometryParameters, QString> getUnknownParameters(const QMap<DimensionType, UnitType> &displayUnits,
72  const QMap<DimensionType, int> &displayDigits) const;
73  virtual void setUnknownParameters(const QMap<GeometryParameters, double> &parameters);
74 
75  //###########################
76  //reexecute the function list
77  //###########################
78 
79  void recalc();
80 
81  //#################
82  //save and load XML
83  //#################
84 
85  QDomElement toOpenIndyXML(QDomDocument &xmlDoc) const;
86  bool fromOpenIndyXML(QDomElement &xmlElem);
87 
88  //###############
89  //display methods
90  //###############
91 
92  QString getDisplayX(const UnitType &type, const int &digits, const bool &showDiff = false) const;
93  QString getDisplayY(const UnitType &type, const int &digits, const bool &showDiff = false) const;
94  QString getDisplayZ(const UnitType &type, const int &digits, const bool &showDiff = false) const;
95  QString getDisplayPrimaryI(const int &digits, const bool &showDiff = false) const;
96  QString getDisplayPrimaryJ(const int &digits, const bool &showDiff = false) const;
97  QString getDisplayPrimaryK(const int &digits, const bool &showDiff = false) const;
98  QString getDisplayA(const UnitType &type, const int &digits, const bool &showDiff = false) const;
99  QString getDisplayB(const UnitType &type, const int &digits, const bool &showDiff = false) const;
100 
101 private:
102 
103  //####################
104  //ellipsoid attributes
105  //####################
106 
107  Position center; //center
108  Direction majorAxis; //major axis vector of the ellipsoid (semi-major axis)
109  double a; //semi-major axis
110  double b; //semi-minor axis
111 
112 };
113 
114 }
115 
116 #endif // ELLIPSOID_H
The Position class.
Definition: position.h:16
EllipsoidUnknowns
Definition: ellipsoid.h:36
Definition: ellipsoid.h:42
Definition: coordinatesystem.h:15
Definition: ellipsoid.h:39
The Geometry class.
Definition: geometry.h:26
Definition: ellipsoid.h:38
Definition: ellipsoid.h:41
UnitType
Definition: types.h:354
Definition: direction.h:13
The Ellipsoid class Defines an ellipsoid of rotation.
Definition: ellipsoid.h:17
#define OI_CORE_EXPORT
Definition: types.h:11
Definition: ellipsoid.h:40
Definition: ellipsoid.h:43