Overture  Version 25
AdvancingFrontParameters.h
Go to the documentation of this file.
1 #ifndef __ADVANCING_FRONT_PARAMETERS__
2 #define __ADVANCING_FRONT_PARAMETERS__
3 
4 #include "Overture.h"
5 #include "DialogData.h"
6 
8 {
9 public:
10 
11  // toggleable parameters, mostly for plotting
12  enum StateEnum {
19  };
20 
21  AdvancingFrontParameters( real maxang=80., real egrowth=-1.0, bool usefunc=true, int defAdvNum=-1,
22  real qt=0.01 );
24  maxNeighborAngle( aparam.maxNeighborAngle ),
25  edgeGrowthFactor( aparam.edgeGrowthFactor ),
26  useControlFunction( aparam.useControlFunction ),
27  defaultNumberOfAdvances(aparam.defaultNumberOfAdvances),
28  searchDistFactor( aparam.searchDistFactor ),
29  discardDistFactor( aparam.discardDistFactor) { }
30 
32 
33  void setMaxNeighborAngle( real ang ) { maxNeighborAngle = ang; }
34  void setEdgeGrowthFactor( real fact ) { edgeGrowthFactor = fact; }
35  void toggleControlFunction() { useControlFunction = !useControlFunction ; }
36  void setNumberOfAdvances( int adv ) { defaultNumberOfAdvances = adv; }
37  void setQualityTolerance( real qt ) { qualityTolerance = qt; }
38 
39  real getMaxNeighborAngle() { return maxNeighborAngle; }
40  real getEdgeGrowthFactor() { return edgeGrowthFactor; }
41 
42  real getQualityTolerance() { return qualityTolerance; }
43 
44  real getAuxiliaryAngleTolerance() { return auxang; }
45  void setAuxiliaryAngleTolerance(real a) { auxang = a; }
46 
47  bool usingControlFunction() { return useControlFunction; }
48  int getNumberOfAdvances() { return defaultNumberOfAdvances; }
49 
50  void toggle(StateEnum t) { toggleParams[t]= !toggleParams[t]; }
51  bool state(StateEnum t) const { return toggleParams[t]; }
52 
53  void highlightFace(int f) { highlightedFace = f; }
54  int highlightFace() const { return highlightedFace; }
55 
56  void setSearchDistFactor( real sdf ) { searchDistFactor = sdf; }
57  real getSearchDistFactor( ) const { return searchDistFactor; }
58 
59  void setDiscardDistFactor( real sdf ) { discardDistFactor = sdf; }
60  real getDiscardDistFactor( ) const { return discardDistFactor; }
61 
62 private:
63  real maxNeighborAngle;
64  real edgeGrowthFactor;
65  real auxang;
66  real qualityTolerance;
67  real searchDistFactor;
68  real discardDistFactor;
69 
70  bool useControlFunction;
71  int defaultNumberOfAdvances;
72  int highlightedFace;
73 
74  bool toggleParams[lastParam];
75 
76 };
77 
78 #endif