Developer documentation | Axl-2.5.1

axlPlane.h
Go to the documentation of this file.
1 /* axlPlane.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 AXLPLANE_H
22 #define AXLPLANE_H
23 
24 #include "axlCoreExport.h"
25 
26 #include "axlAbstractData.h"
27 
28 #include <QtCore>
29 
30 class axlPoint;
31 
32 class axlPlanePrivate;
33 
35 {
36  Q_OBJECT
37  Q_PROPERTY(axlPoint point READ point WRITE touchPoint);
38  Q_PROPERTY(axlPoint normal READ normal WRITE touchNormal);
39 
40 public:
41  axlPlane(QObject *parent = 0);
42  axlPlane(axlPoint *point, axlPoint *normal, QObject *parent = 0);
43  axlPlane(const axlPoint& point, const axlPoint& normal, QObject *parent = 0);
44  axlPlane(const axlPlane& other);
45  ~axlPlane(void);
46 
47  virtual QString description(void) const;
48  virtual QString identifier(void) const;
49 
50  axlPoint *point(void) const;
51  axlPoint *normal(void) const;
52 
53  void setValues(axlPoint *point, axlPoint *normal);
54 
55  void setPoint(axlPoint *point);
56  void setPoint(double *p);
57 
58  void setNormal(axlPoint *normal);
59  void setNormal(double *normal);
60 
61  void touchPoint(axlPoint point);
62  void touchNormal(axlPoint normal);
63 
64  axlPlane& operator =(const axlPlane& other);
65 
66  friend QDebug operator<<(QDebug dbg, axlPlane plane);
67  friend QDebug operator<<(QDebug dbg, axlPlane& plane);
68  friend QDebug operator<<(QDebug dbg, axlPlane *plane);
69 
70  //IPC
71  QVariantList convertDataToQVariant(void) const;
72  int convertQVariantToData(const QVariantList &data);
73 
74 //public slots:
75  //void onPointChanged(axlPoint *point);
76  //void onNormalChanged(axlPoint *normal);
77 
78 private:
79  axlPlanePrivate *d;
80 };
82 
83 //to be registered to the data factory.
84 dtkAbstractData *createaxlPlane(void);
85 
86 // /////////////////////////////////////////////////////////////////
87 // Debug operators
88 // /////////////////////////////////////////////////////////////////
89 
90 QDebug operator<<(QDebug dbg, axlPlane point);
91 QDebug operator<<(QDebug dbg, axlPlane& point);
92 QDebug operator<<(QDebug dbg, axlPlane *point);
93 
94 #endif // AXLPLANE_H
Class axlPoint defines 3D points.
Definition: axlPoint.h:34
Q_DECLARE_METATYPE(axlAbstractData)
Class axlPlane defines 3D planes.
Definition: axlPlane.h:34
virtual int convertQVariantToData(const QVariantList &data)
Modify properties and geometry variables of the axlAbstractData. Return 1 if the modification was suc...
virtual QVariantList convertDataToQVariant(void) const
Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData...
#define AXLCORE_EXPORT
Class axlAbstractData defines an API for all type of axel data.
QDebug operator<<(QDebug dbg, axlPlane point)
Definition: axlPlane.cpp:211
dtkAbstractData * createaxlPlane(void)
Definition: axlPlane.cpp:292