OpenIndy-Core  0.2.0.43
hyperboloid.h
Go to the documentation of this file.
1 #ifndef HYPERBOLOID_H
2 #define HYPERBOLOID_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  Hyperboloid(const bool &isNominal, QObject *parent = 0);
23  Hyperboloid(const bool &isNominal, const Position &center, const Direction &axis, const double &a, const double &c, QObject *parent = 0);
24 
25  Hyperboloid(const Hyperboloid &copy, QObject *parent = 0);
26 
27  Hyperboloid &operator=(const Hyperboloid &copy);
28 
29  ~Hyperboloid();
30 
31  //########################################
32  //order of unknown parameters (Qxx-matrix)
33  //########################################
34 
36  unknownCenterX = 0,
43  unknownC
44  };
45 
46  //###################################################################
47  //check wether this geometry has a direction, a position and a radius
48  //###################################################################
49 
50  bool hasDirection() const;
51  bool hasPosition() const;
52 
53  //#################################
54  //get or set hyperboloid parameters
55  //#################################
56 
57  const Direction &getDirection() const;
58  const Position &getPosition() const;
59 
60  const double &getA() const;
61  const double &getC() const;
62 
63  void setHyperboloid(const Position &center, const Direction &axis, const double &a, const double &c);
64 
65  //#############################
66  //get or set unknown parameters
67  //#############################
68 
69  virtual QMap<GeometryParameters, QString> getUnknownParameters(const QMap<DimensionType, UnitType> &displayUnits,
70  const QMap<DimensionType, int> &displayDigits) const;
71  virtual void setUnknownParameters(const QMap<GeometryParameters, double> &parameters);
72 
73  //###########################
74  //reexecute the function list
75  //###########################
76 
77  void recalc();
78 
79  //#################
80  //save and load XML
81  //#################
82 
83  QDomElement toOpenIndyXML(QDomDocument &xmlDoc) const;
84  bool fromOpenIndyXML(QDomElement &xmlElem);
85 
86  //###############
87  //display methods
88  //###############
89 
90  QString getDisplayX(const UnitType &type, const int &digits, const bool &showDiff = false) const;
91  QString getDisplayY(const UnitType &type, const int &digits, const bool &showDiff = false) const;
92  QString getDisplayZ(const UnitType &type, const int &digits, const bool &showDiff = false) const;
93  QString getDisplayPrimaryI(const int &digits, const bool &showDiff = false) const;
94  QString getDisplayPrimaryJ(const int &digits, const bool &showDiff = false) const;
95  QString getDisplayPrimaryK(const int &digits, const bool &showDiff = false) const;
96  QString getDisplayA(const UnitType &type, const int &digits, const bool &showDiff = false) const;
97  QString getDisplayC(const UnitType &type, const int &digits, const bool &showDiff = false) const;
98 
99 private:
100 
101  //######################
102  //hyperboloid attributes
103  //######################
104 
105  Position center; //center
106  Direction axis; //the rotation axis
107  double a;
108  double c;
109 
110 };
111 
112 }
113 
114 #endif // HYPERBOLOID_H
Definition: hyperboloid.h:42
HyperboloidUnknowns
Definition: hyperboloid.h:35
The Position class.
Definition: position.h:16
Definition: hyperboloid.h:40
Definition: hyperboloid.h:41
Definition: coordinatesystem.h:15
Definition: hyperboloid.h:37
Definition: hyperboloid.h:39
The Geometry class.
Definition: geometry.h:26
Definition: hyperboloid.h:38
UnitType
Definition: types.h:354
Definition: direction.h:13
#define OI_CORE_EXPORT
Definition: types.h:11
The Hyperboloid class Defines a single shell hyperboloid of rotation of the form 1 = x^2/a^2 + y^2/b^...
Definition: hyperboloid.h:17