libsurf
Programmer's Documentation

spotrefine.h (r6227/r5385)
1 
2 /* Copyright (C) 2015 David Eller <david@larosterna.com>
3  *
4  * Commercial License Usage
5  * Licensees holding valid commercial licenses may use this file in accordance
6  * with the terms contained in their respective non-exclusive license agreement.
7  * For further information contact david@larosterna.com .
8  *
9  * GNU General Public License Usage
10  * Alternatively, this file may be used under the terms of the GNU General
11  * Public License version 3.0 as published by the Free Software Foundation and
12  * appearing in the file gpl.txt included in the packaging of this file.
13  */
14 
15 #ifndef SURF_SPOTREFINE_H
16 #define SURF_SPOTREFINE_H
17 
18 #include <genua/svector.h>
19 #include "dnrefine.h"
20 
21 class MeshComponent;
22 class SpotRefine;
23 typedef std::vector<SpotRefine> RSpotArray;
24 
31 {
32  public:
33 
35  SpotRefine() : ru(0.0), rv(0.0) {}
36 
38  SpotRefine(const MeshComponent & c, const uint *vi, Real sratio);
39 
41  bool overlaps(const SpotRefine & a) const;
42 
44  void merge(const SpotRefine & a);
45 
47  void append(Real f, DnRegionCriterionPtr rcp) const;
48 
50  static void mergeOverlaps(RSpotArray & xsa);
51 
53  static uint append(const RSpotArray & xsa, Real f, DnRefineCriterionPtr rcp);
54 
56  static void erase(uint npre, DnRefineCriterionPtr rcp);
57 
58  // debug
59  std::ostream & write(std::ostream & os) const;
60 
61  private:
62 
64  Vct2 ctr;
65 
67  Real ru, rv, maxsr;
68 };
69 
70 
71 
72 #endif
static void mergeOverlaps(RSpotArray &xsa)
join neighbor spots
Definition: spotrefine.cpp:67
void append(Real f, DnRegionCriterionPtr rcp) const
add corresponding region to criterion
Definition: spotrefine.cpp:58
Mesh component.
Definition: meshcomponent.h:36
Vct2 ctr
center in parameter space
Definition: spotrefine.h:64
static void erase(uint npre, DnRefineCriterionPtr rcp)
erase appended regions using marker
Definition: spotrefine.cpp:109
SpotRefine()
undefined
Definition: spotrefine.h:35
Real ru
u and v radius in parameter space
Definition: spotrefine.h:67
Point mesh refinement.
Definition: spotrefine.h:30
bool overlaps(const SpotRefine &a) const
check if this overlaps spot a
Definition: spotrefine.cpp:35
void merge(const SpotRefine &a)
extand this spot to cover a
Definition: spotrefine.cpp:45
Generated on Wed Jan 19 2022 03:03:15 for libsurf by   doxygen 1.8.5