1 #ifndef axlShapeBSpline_H
2 #define axlShapeBSpline_H
4 #include "axlCoreExport.h"
24 ControlPoint(
int ind,
double x =0.0 ,
double y = 0.0,
double z = 0.0) {
26 coordinates << x << y << z;
30 coordinates.replace(0,newCoordinate[0]);
31 coordinates.replace(1,newCoordinate[1]);
32 coordinates.replace(2,newCoordinate[2]);
36 edges.append(numEdge);
40 faces.append(numFace);
53 controlPointsIndices = p;
63 return controlPointsIndices.contains(i);
67 return controlPointsIndices.first();
71 return controlPointsIndices.last();
86 controlPointsIndices = p;
94 return controlPointsIndices.contains(i);
99 l = controlPointsIndices.toList().toStdList();
101 controlPointsIndices = QVector<int>::fromList(QList<int>::fromStdList(l));
111 static bool registered(
void);
112 QString description(
void)
const;
113 QString identifier(
void)
const;
117 void setSurface(
int order_u,
int order_v,
int nbpoints,
int nbEdges,
int nbFaces,
double *points, QVector< QVector<int> > pe, QVector< QVector<int> >pf, QVector< QPair<int,int> >npf);
118 void setControlPoints(
int nbpoints,
double *points);
119 void setFace(
int i, QVector<int> p,
int order_u,
int order_v,
int nu,
int nv);
121 void setEdge(
int i, QVector<int> p,
int order);
123 void removeEdge(
int i);
125 void createSurfaceFromBSplineDataSet(QList<axlAbstractSurfaceBSpline *> dataSet);
128 Edge *getEdge(
int i);
129 Face *getFace(
int i);
130 ControlPoint *getPoint(
int i);
134 bool setCoef(
int index,
double * newCoordinate);
136 int countControlPoints()
const;
137 int countBoundaryEdges()
const;
142 int numSamples_u(
int numCell);
143 int numSamples_v(
int numCell);
144 void setNumSamples_u(
int numSamples);
145 void setNumSamples_v(
int numSamples);
156 void setStripes(
int stripes);
157 void normal(
axlPoint *normal,
double u,
double v);
158 void eval(
axlPoint *point,
double u,
double v);
160 bool connectionsAreDefined(
void);
161 QList<int> getControlPointConnection(
int i);
163 int countControlPoints_u(
void)
const;
164 int countControlPoints_v(
void)
const;
169 double scalarValue(
double u,
double v);
170 void setScalarValue(
double u,
double v,
double value);
173 double startParam_u(
int i);
174 double startParam_v(
int i);
175 double endParam_u(
int i);
176 double endParam_v(
int i);
177 void eval(
axlPoint *point,
double u,
double v,
int i);
178 void normal(
axlPoint *currentNormal,
double paramCourant_u,
double paramCourant_v,
int indice);
181 int countFaces(
void);
183 void insert_point(
double x,
double y,
double z);
185 void insert_edge(Edge *edge);
186 void insert_face(Face *face);
188 void updateFaceEdges(
int numFace);
190 void emitEdgeSelected(
int numEdge);
194 void indexSelected(
int i);
197 double *fillCoordinates(QVector<int> p);
198 double *knots(
int pointsCount,
int order);
199 bool isContained(QList<axlPoint> list,
axlPoint p, QVector<int>& pf);
203 axlShapeBSplinePrivate *d;
208 #endif // axlShapeBSpline_H
void setCoord(double *newCoordinate)
Class axlPoint defines 3D points.
void addFace(int numFace)
QVector< int > edgesIndices
Face(int ind, int nu, int nv, QVector< int > p, axlAbstractSurfaceBSpline *surf)
QVector< int > controlPointsIndices
void sortControlPoints(void)
ControlPoint(int ind, double x=0.0, double y=0.0, double z=0.0)
void addEdge(int numEdge)
dtkAbstractData * createaxlShapeBSpline(void)
bool containsControlPoint(int i)
axlAbstractCurveBSpline * support
Edge(int ind, QVector< int > p, axlAbstractCurveBSpline *curv)
QVector< double > coordinates
Class axlShapeBSpline defines a set of boundary curves (Edges) and bspline surface patches (Face)...
axlAbstractSurfaceBSpline * support
Class axlAbstractData defines an API for all type of axel data.
QVector< int > controlPointsIndices
bool containsControlPoint(int i)