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