Developer documentation | Axl-2.5.1

axlAbstractSurfaceBSpline.h
Go to the documentation of this file.
1 /* axlAbstractSurfaceBSpline.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: Tue Mar 29 11:36:56 2011 (+0200)
8  * By: Julien Wintz
9  * Update #: 46
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 #ifndef AXLABSTRACTSURFACEBSPLINE_H
21 #define AXLABSTRACTSURFACEBSPLINE_H
22 
24 #include "axlCoreExport.h"
25 
26 #include <dtkMathSupport/dtkVector3D.h>
27 
28 class axlMesh;
29 
30 class axlAbstractSurfaceBSplinePrivate;
31 
33 {
34  Q_OBJECT
35 
36 public:
38  virtual ~axlAbstractSurfaceBSpline(void);
39 
40  using axlAbstractSurfaceParametric::copy;
41  virtual axlAbstractSurfaceBSpline* copy (void) const;
42 
43  virtual int countControlPoints(void) const;
44  virtual int countControlPoints_u(void) const;
45  virtual int countControlPoints_v(void) const;
46 
47  virtual int knotVectorSize_u(void) const;
48  virtual int knotVectorSize_v(void) const;
49 
50  virtual int order_u(void) const;
51  virtual int order_v(void) const;
52 
53  virtual double getCoord(int n, int m, int v) const;
54  virtual axlPoint getCoef(int n, int m) const;
55  virtual axlPoint getCoef(int n ) const;
56 
57  //---Added
58  virtual double getWeight(int n, int m) const;
59 
60  virtual bool setCoef(int n, int m, int v, double c);
61  virtual bool setCoef(int n, int m, double *controlPoint);
62  virtual bool setCoef(int n, double *controlPoint);
63 
64  virtual double getKnot_u(int n) const;
65  virtual double getKnot_v(int n) const;
66 
67  virtual void setSurface(int pointsCount_u, int pointsCount_v, int order_u, int order_v, int dimension, double *knots_u, double *knots_v, double *points, bool rational);
68 
69  //---Added
70  virtual void updateRcoeff();
71 
72  virtual void insertKnot_u(double k);
73  virtual void removeKnot_u(double k);
74 
75  virtual void insertKnot_v(double k);
76  virtual void removeKnot_v(double k);
77 
78  virtual bool rational(void) const;
79 
80  virtual QVector<axlPoint *> sampling();
81 
82  virtual void gridEvaluator(int num_u, int num_v, std::vector<double>& points, std::vector<double>& param_u, std::vector<double>& param_v);
83 
84  virtual QString printCoeffs(bool print) const;
85  virtual QString printKnotsVector(bool print) const;
86 
87  virtual QString description(void) const;
88 
89  //converter method for qjson-rpc communication.
90  QVariantList convertDataToQVariant(void) const;
91  int convertQVariantToData(const QVariantList &data);
92 
93 
94  // Scalar values proof of concept
95  double scalarValue(double u, double v);
96  void setScalarValue(double u, double v, double value);
97 
98  //control points ' connections definition
99  virtual bool connectionsAreDefined(void);
100 
101  virtual QList<int> getControlPointConnection(int i); // give all the connections that are still to be made for the ith coefficient.
102  virtual void defineControlPointConnection(int i, int j);// i and j represents coefficient numbers.
103 
104  virtual void resetControlPointConnections(void);
105 
106  virtual void selectIndex(int i) { emit indexSelected(i); }
107 
108 signals:
109  void updated(void);
110  void samplingChanged(void);
111  void edgeSelected(int numEdge, int previous, int n);
112  void indexSelected(int i);
113  void modifiedControlPoints(void);
114 
115 private:
116  axlAbstractSurfaceBSplinePrivate *d;
117 };
118 
119 #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...
virtual QVariantList convertDataToQVariant(void) const
Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData...
#define AXLCORE_EXPORT
Class axlMesh defines a piecewise-linear 3D object.
Definition: axlMesh.h:41