Developer documentation | Axl-2.5.1

axlCircleArc.h
Go to the documentation of this file.
1 /* axlCircleArc.h ---
2  *
3  * Author: Valentin Michelet
4  * Copyright (C) 2008 - Valentin Michelet, 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: Valentin Michelet
9  * Update #: 21
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 #ifndef AXLCIRCLEARC_H
21 #define AXLCIRCLEARC_H
22 
23 #include "axlCoreExport.h"
25 
26 #include <QtCore>
27 
28 class axlPoint;
29 
30 class axlCircleArcPrivate;
31 
33  Q_OBJECT
34 
35 public:
36  axlCircleArc(QObject* parent = 0);
37  axlCircleArc(const axlPoint& point1, const axlPoint& point2, const axlPoint& center, const axlPoint& normal, bool direct = true);
38  axlCircleArc(const axlCircleArc& other);
39  virtual ~axlCircleArc(void);
40 
41  virtual QString description(void) const;
42  virtual QString identifier(void) const;
43 
44  double calculateRadius(void) const;
45  axlPoint calculateNormal(void) const;
46 
47  axlPoint point1(void) const;
48  axlPoint point2(void) const;
49  axlPoint center(void) const;
50  axlPoint normal(void) const;
51  bool isDirect(void) const;
52 
53  void setValues(const axlPoint& point1, const axlPoint& point2, const axlPoint& center, const axlPoint &normal, bool direct = true);
54  void setPoint1(const axlPoint& point1);
55  void setPoint2(const axlPoint& point2);
56  void setNormal(const axlPoint& normal);
57  void setCenter(const axlPoint& center);
58  void setDirect(bool direct);
59 
60  void modifyPoint1(double* point1);
61  void modifyPoint2(double* point2);
62  void modifyNormal(double* normal);
63  void modifyCenter(double* center);
64 
65  axlCircleArc& operator=(const axlCircleArc& other);
66 
67  friend QDebug operator<<(QDebug dbg, axlCircleArc arc);
68  friend QDebug operator<<(QDebug dbg, axlCircleArc& arc);
69  friend QDebug operator<<(QDebug dbg, axlCircleArc* arc);
70 
71  void applyMatrix(double* matrix);
72 
73  //IPC
74  QVariantList convertDataToQVariant(void) const;
75  int convertQVariantToData(const QVariantList &data);
76 
77 
78 
79 public slots:
80  void onPoint1XChanged(double x);
81  void onPoint1YChanged(double y);
82  void onPoint1ZChanged(double z);
83  void onPoint2XChanged(double x);
84  void onPoint2YChanged(double y);
85  void onPoint2ZChanged(double z);
86  void onCenterXChanged(double x);
87  void onCenterYChanged(double y);
88  void onCenterZChanged(double z);
89  void onNormalXChanged(double x);
90  void onNormalYChanged(double y);
91  void onNormalZChanged(double z);
92  virtual void onDirectChanged(bool direct);
93 
94 private:
95  axlCircleArcPrivate* d;
96 };
97 
98 //to be registered to the data factory.
99 dtkAbstractData *createaxlCircleArc(void);
100 
101 // /////////////////////////////////////////////////////////////////
102 // Debug operators
103 // /////////////////////////////////////////////////////////////////
104 
105 QDebug operator<<(QDebug dbg, axlCircleArc point);
106 QDebug operator<<(QDebug dbg, axlCircleArc& point);
107 QDebug operator<<(QDebug dbg, axlCircleArc* point);
108 
109 #endif // AXLCIRCLEARC_H
Class axlPoint defines 3D points.
Definition: axlPoint.h:34
virtual void onDirectChanged(bool direct)
virtual int convertQVariantToData(const QVariantList &data)
Modify properties and geometry variables of the axlAbstractData. Return 1 if the modification was suc...
Generic interface for parametric curve.
virtual QVariantList convertDataToQVariant(void) const
Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData...
dtkAbstractData * createaxlCircleArc(void)
QDebug operator<<(QDebug dbg, axlCircleArc point)
#define AXLCORE_EXPORT