Developer documentation | Axl-2.5.1

axlEllipsoid.h
Go to the documentation of this file.
1 /* axlEllipsoid.h ---
2  *
3  * Author: Meriadeg Perrinel
4  * Copyright (C) 2008 - Meriadeg Perrinel, Inria.
5  * Created: Tue Nov 9 16:58:59 2010 (+0100)
6  * Version: $Id$
7  * Last-Updated: Mon Dec 6 15:46:18 2010 (+0100)
8  * By: Meriadeg Perrinel
9  * Update #: 21
10  */
11 
12 /* Commentary:
13  * There is choice table for stock coordinate. But maybe that is nos the good solution if algorithm behin use a lot of point.
14  * In this case, we have to create three double directly instead of table
15  */
16 
17 /* Change log:
18  *
19  */
20 
21 #ifndef AXLELLIPSOID_H
22 #define AXLELLIPSOID_H
23 
24 #include "axlCoreExport.h"
25 #include "axlAbstractData.h"
26 
27 #include "dtkMathSupport/dtkQuaternion.h"
28 
29 #include <QtCore>
30 
31 class axlPoint;
32 
33 class axlEllipsoidPrivate;
34 
36 {
37  Q_OBJECT
38  Q_PROPERTY(axlPoint center READ center WRITE touchCenter);
39  Q_PROPERTY(axlPoint semiX READ semiX WRITE touchSemiX);
40  Q_PROPERTY(axlPoint semiY READ semiY WRITE touchSemiY);
41  Q_PROPERTY(axlPoint semiZ READ semiZ WRITE touchSemiZ);
42 
43 public:
44  axlEllipsoid(QObject *parent = 0);
45  axlEllipsoid(axlPoint *center, axlPoint *semiX, axlPoint *semiY, axlPoint *semiZ, QObject *parent = 0);
46  axlEllipsoid(const axlPoint& center, const axlPoint& semiX, const axlPoint& semiY, const axlPoint& semiZ, QObject *parent = 0);
47  axlEllipsoid(const axlEllipsoid& other);
48  ~axlEllipsoid(void);
49 
50  virtual QString description(void) const;
51  virtual QString identifier(void) const;
52 
53  axlPoint *center(void) const;
54  axlPoint *semiX(void) const;
55  axlPoint *semiY(void) const;
56  axlPoint *semiZ(void) const;
57 
58  void setValues(axlPoint *center, axlPoint *semiX, axlPoint *semiY, axlPoint *semiZ);
59  void setCenter(axlPoint *center);
60  void setSemiX(axlPoint *semiX);
61  void setSemiY(axlPoint *semiY);
62  void setSemiZ(axlPoint *semiZ);
63 
64  void touchCenter(axlPoint center);
65  void touchSemiX(axlPoint semiX);
66  void touchSemiY(axlPoint semiY);
67  void touchSemiZ(axlPoint semiZ);
68 
69  void modifyCenter(double *center);
70  void modifyCenterX(double x);
71  void modifyCenterY(double y);
72  void modifyCenterZ(double z);
73 
74  void modifySemiX(double *semiX);
75  void modifySemiXX(double x);
76  void modifySemiXY(double y);
77  void modifySemiXZ(double z);
78 
79  void modifySemiY(double *semiY);
80  void modifySemiYX(double x);
81  void modifySemiYY(double y);
82  void modifySemiYZ(double z);
83 
84  void modifySemiZ(double *semiZ);
85  void modifySemiZX(double x);
86  void modifySemiZY(double y);
87  void modifySemiZZ(double z);
88 
89  axlEllipsoid& operator =(const axlEllipsoid& other);
90 
91  friend QDebug operator<<(QDebug dbg, axlEllipsoid line);
92  friend QDebug operator<<(QDebug dbg, axlEllipsoid& line);
93  friend QDebug operator<<(QDebug dbg, axlEllipsoid *line);
94 
95  //IPC
96  QVariantList convertDataToQVariant(void) const;
97  int convertQVariantToData(const QVariantList &data);
98 
99 public slots:
100  void onCenterChanged(axlPoint *center);
101  void onSemiXChanged(axlPoint *semiX);
102  void onSemiYChanged(axlPoint *semiY);
103  void onSemiZChanged(axlPoint *semiZ);
104  void calculateYZ(void);
105  void calculateXZ(void);
106  void calculateXY(void);
107 
108 private:
109  axlEllipsoidPrivate *d;
110 };
112 
113 dtkAbstractData *createaxlEllipsoid(void);
114 
115 // /////////////////////////////////////////////////////////////////
116 // Debug operators
117 // /////////////////////////////////////////////////////////////////
118 
119 QDebug operator<<(QDebug dbg, axlEllipsoid point);
120 QDebug operator<<(QDebug dbg, axlEllipsoid& point);
121 QDebug operator<<(QDebug dbg, axlEllipsoid *point);
122 
123 #endif // AXLELLIPSOID_H
Class axlPoint defines 3D points.
Definition: axlPoint.h:34
dtkAbstractData * createaxlEllipsoid(void)
Q_DECLARE_METATYPE(axlAbstractData)
virtual int convertQVariantToData(const QVariantList &data)
Modify properties and geometry variables of the axlAbstractData. Return 1 if the modification was suc...
QDebug operator<<(QDebug dbg, axlEllipsoid point)
virtual QVariantList convertDataToQVariant(void) const
Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData...
#define AXLCORE_EXPORT
Class axlEllipsoid defines 3D ellipsoids.
Definition: axlEllipsoid.h:35
Class axlAbstractData defines an API for all type of axel data.