Developer documentation | Axl-2.5.1

axlAbstractCurveBSpline.h
Go to the documentation of this file.
1 /* axlAbstractCurveBSpline.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 16:07:03 2010 (+0100)
8  * By: Meriadeg Perrinel
9  * Update #: 42
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 #ifndef AXLABSTRACTCURVEBSPLINE_H
21 #define AXLABSTRACTCURVEBSPLINE_H
22 
24 #include "axlPoint.h"
25 
26 #include "axlCoreExport.h"
27 
28 class axlAbstractCurveBSplinePrivate;
29 
31 {
32  Q_OBJECT
33 
34 public:
35 
36  typedef QMap<double, axlPoint> Sample;
37 
38 public:
40  virtual ~axlAbstractCurveBSpline(void);
41 
42  virtual int countControlPoints(void) const;
43  virtual int knotVectorSize(void) const;
44  virtual int order(void) const;
45  virtual int numCoefs() const;
46 
47  virtual bool rational(void) const;
48 
49  virtual double startParam(void);
50  virtual double endParam(void);
51 
52  virtual void setCurve(int pointsCount, int order, int dimension, double *knots, double *points, bool rational);
53 
54  virtual axlPoint closestPoint(const axlPoint& pt);
55  virtual double closestParameter(const axlPoint& pt);
56 
57  virtual Sample sampling(int n);
58 
59  virtual void insertKnot(double k);
60  virtual void removeKnot(double k);
61 
62  virtual axlPoint getCoef(int n) const ;
63  virtual bool setCoef(int n, double *controlPoint);
64  virtual double getKnot(int n) const;
65 
66  virtual QString printCoeffs(bool print) const;
67  virtual QString printKnotsVector(bool print) const;
68 
69  //Added
70  virtual double getWeight(int n) const;
71 
72  //Added
73  virtual void updateRcoeff();
74 
75 
76  virtual QString description(void) const;
77 
78  virtual bool connectionsAreDefined(void);
79  virtual QList<int> getControlPointConnection(int i);
80  virtual void defineControlPointConnection(int i, int j);// i and j represents coefficient numbers.
81  virtual void resetControlPointConnections(void);
82 
83  //converter method for qjson-rpc communication.
84  QVariantList convertDataToQVariant(void) const;
85  int convertQVariantToData(const QVariantList &data);
86 
87  virtual void selectIndex(int i) { emit indexSelected(i); }
88 
89 signals:
90  void updated(void);
91  void samplingChanged();
92  void indexSelected(int);
93 
94 private:
95  axlAbstractCurveBSplinePrivate *d;
96 };
97 
98 #endif
Class axlPoint defines 3D points.
Definition: axlPoint.h:34
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...
virtual void selectIndex(int i)
QMap< double, axlPoint > Sample
#define AXLCORE_EXPORT