Overture  Version 25
MappingProjectionParameters.h
Go to the documentation of this file.
1 #ifndef MAPPING_PROJECTION_PARAMETERS_H
2 #define MAPPING_PROJECTION_PARAMETERS_H
3 
4 #include "Mapping.h"
5 
6 //--------------------------------------------------------------------------
7 // This class holds parameters for the Mapping project function.
8 //
9 // It will hold state values that depend on the type of Mapping being projected,
10 // either a standard Mapping or a CompositeSurface
11 //--------------------------------------------------------------------------
13 {
14  public:
15 
17  {
22  };
24  {
25  r=0,
26  x=1,
27  xr=2,
28  normal=3,
30  };
31 
32 
35 
37 
38  // indicate whether the projection is being used with a marching algorithm
39  int setIsAMarchingAlgorithm(const bool & trueOrFalse =true );
40  bool isAMarchingAlgorithm() const;
41 
42  // adjust for corners when marching over a surface.
43  int setAdjustForCornersWhenMarching(const bool & trueOrFalse =true );
44  bool adjustForCornersWhenMarching(){return adjustForCorners;} //
45 
46  // This next option is used when first projecting onto the triangulation before
47  // projecting onto the CompositeSurface -- since we just want the subsurface info
48  // but do not want to change the positions of points, unless they were adjusted at corners.
49  int setOnlyChangePointsAdjustedForCornersWhenMarching(const bool & trueOrFalse =true );
50  bool onlyChangePointsAdjustedForCornersWhenMarching(){return onlyChangePointsAdjustedForCorners;} // fixed 070427 *wdh*
51 
52  // if on a corner, choose the normal which best matches the input normal.
53  int setMatchNormals(const bool & trueOrFalse =true );
54  bool getMatchNormals() const{ return matchNormals;} //
55 
56  // Project onto the reference surface (if false, use the surface triangulation if it exists)
57  int setProjectOntoReferenceSurface(const bool & trueOrFalse =true );
58  bool projectOntoReferenceSurface() const{ return projectOntoTheReferenceSurface;} //
59 
60  // reset the parameters:
61  int reset();
62 
63  // for tree search on unstructured grids:
64  int setSearchBoundingBoxSize( real estimated, real maximumAllowed=0. );
65 
67 
69 
71 
72  private:
73 
74  bool marching;
75  bool adjustForCorners;
76  bool matchNormals;
77  bool onlyChangePointsAdjustedForCorners;
78  bool projectOntoTheReferenceSurface;
79 
80  // All the arrays are saved in the following two arrays of pointers
81  intArray *integerArrayParameter[numberOfIntegerArrayParameters];
82  realArray *realArrayParameter[numberOfRealArrayParameters];
83 
84 };
85 
86 
87 #endif