@@ -24,6 +24,10 @@ namespace Go {
24
24
class LRBSpline3D ;
25
25
26
26
27
+ // / Storage for data points situated in this element, and accuracy information derived from
28
+ // / these points with relation to the LR B-spline volume where the element belongs.
29
+ // / This volume is expected to approximate the point cloud where the points
30
+ // / of this element make up a sub set
27
31
struct Approx3DData
28
32
{
29
33
Approx3DData ()
@@ -196,34 +200,56 @@ struct Approx3DData
196
200
};
197
201
198
202
203
+ // / An element (or a mesh cell) in an LR B-spline volume description. The
204
+ // / elements contain information about the LRBSpline3D having this element
205
+ // / in its support and has the potential of storing data points corresponding
206
+ // / to this element with derived accuracy information.
199
207
200
208
201
209
class Element3D
202
210
{
203
211
public:
212
+ // / Constructor for an empty element
204
213
Element3D ();
214
+ // / Constructor giving element boundaries
205
215
Element3D (double start_u, double start_v, double start_w, double stop_u, double stop_v, double stop_w);
216
+ // / Remove a B-spline with this element in its support from the vector maintained in the element
206
217
void removeSupportFunction (LRBSpline3D *f);
218
+ // / Add a B-spline with this element in its support from the vector maintained in the elemen
207
219
void addSupportFunction (LRBSpline3D *f);
220
+ // / Split element in the given direction and value. Called from volume refinement.
208
221
Element3D *split (Direction3D split_dir, double par_value);
209
222
Element3D* copy ();
210
223
// get/set methods
224
+ // / Start parameter in the first parameter direction
211
225
double umin () const { return start_u_; }
226
+ // / Start parameter in the second parameter direction
212
227
double vmin () const { return start_v_; }
228
+ // / Start parameter in the third parameter direction
213
229
double wmin () const { return start_w_; }
230
+ // / End parameter in the first parameter direction
214
231
double umax () const { return stop_u_; }
232
+ // / End parameter in the second parameter direction
215
233
double vmax () const { return stop_v_; }
234
+ // / End parameter in the third parameter direction
216
235
double wmax () const { return stop_w_; }
236
+ // / Volume of element domain
217
237
double volume () const { return (stop_w_-start_w_)*(stop_v_-start_v_)*(stop_u_-start_u_); }
238
+ // / Start iterator to B-splines with this element in their support
218
239
std::vector<LRBSpline3D*>::iterator supportBegin () { return support_.begin (); }
240
+ // / End iterator to B-splines with this element in their support
219
241
std::vector<LRBSpline3D*>::iterator supportEnd () { return support_.end (); }
242
+ // / Start iterator to B-splines with this element in their support
220
243
std::vector<LRBSpline3D*>::const_iterator supportBegin ()const { return support_.begin (); }
244
+ // / End iterator to B-splines with this element in their support
221
245
std::vector<LRBSpline3D*>::const_iterator supportEnd () const { return support_.end (); }
246
+ // / Return a reference to the vector of B-splines with this element in their support
222
247
const std::vector<LRBSpline3D*>& getSupport () const
223
248
{
224
249
return support_;
225
250
}
226
251
252
+ // / Check if the parameter pair is contained in the element domain
227
253
bool contains (double upar, double vpar, double wpar)
228
254
{
229
255
return (upar >= start_u_ && upar <= stop_u_ &&
@@ -232,13 +258,21 @@ class Element3D
232
258
}
233
259
234
260
261
+ // / Accsess one specified B-spline with this element in the support
235
262
LRBSpline3D* supportFunction (int i) { return support_[i]; }
263
+ // / Number of B-splines having this element in their support
236
264
int nmbBasisFunctions () const { return (int )support_.size (); }
265
+ // / Modify the start of the element domain in the first parameter direction
237
266
void setUmin (double u) { start_u_ = u; }
267
+ // / Modify the start of the element domain in the second parameter direction
238
268
void setVmin (double v) { start_v_ = v; }
269
+ // / Modify the start of the element domain in the third parameter direction
239
270
void setWmin (double w) { start_w_ = w; }
271
+ // / Modify the end of the element domain in the first parameter direction
240
272
void setUmax (double u) { stop_u_ = u; }
273
+ // / Modify the end of the element domain in the second parameter direction
241
274
void setVmax (double v) { stop_v_ = v; }
275
+ // / Modify the end of the element domain in the third parameter direction
242
276
void setWmax (double w) { stop_w_ = w; }
243
277
244
278
bool isOverloaded () const ;
@@ -424,8 +458,8 @@ class Element3D
424
458
approx_data_->resetAccuracyInfo ();
425
459
}
426
460
427
- // Update accuracy statistics in points. Number of outside
428
- // points is NOT changed
461
+ // / Update accuracy statistics in points.
462
+ // / Number of outside points is NOT changed
429
463
void updateAccuracyInfo ();
430
464
431
465
// / Check if the element has been modified lately
0 commit comments