xmsmesh  1.0
MeMultiPolyMesherIo.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
7 //------------------------------------------------------------------------------
8 
9 //----- Included files ---------------------------------------------------------
10 
11 // 3. Standard library headers
12 
13 // 4. External library headers
14 #include <xmscore/stl/vector.h>
16 
17 // 5. Shared code headers
18 
19 //----- Forward declarations ---------------------------------------------------
20 
21 //----- Namespace declaration --------------------------------------------------
22 
23 namespace xms
24 {
25 class InterpBase;
26 //----- Constants / Enumerations -----------------------------------------------
27 
28 //----- Structs / Classes ------------------------------------------------------
29 
30 //----- Function prototypes ----------------------------------------------------
31 
36 {
37 public:
45  MePolyInput(const VecPt3d& a_outPoly = VecPt3d(),
46  const VecPt3d2d& a_insidePolys = VecPt3d2d(),
47  double a_bias = 1.0,
48  const BSHP<InterpBase> a_sizeFunction = nullptr,
49  const VecInt& a_polyCorners = VecInt(),
50  const BSHP<InterpBase> a_elevFunction = nullptr)
51  : m_outPoly(a_outPoly)
52  , m_insidePolys(a_insidePolys)
53  , m_bias(a_bias)
54  , m_sizeFunction(a_sizeFunction)
55  , m_constSizeFunction(-1.0)
56  , m_constSizeBias(-1.0)
57  , m_polyCorners(a_polyCorners)
58  , m_elevFunction(a_elevFunction)
60  , m_polyId(-1)
62  {
63  }
64 
67 
70 
73  double m_bias;
74 
76  BSHP<InterpBase> m_sizeFunction;
81 
86 
88  BSHP<InterpBase> m_elevFunction;
89 
93 
97 
100  int m_polyId;
101 
107 
111  std::string m_relaxationMethod;
112 }; // MePolyInput
113 
118 {
119 public:
124  MeRefinePoint(const Pt3d& a_pt, double a_size, bool a_createMeshPoint)
125  : m_pt(a_pt)
126  , m_size(a_size)
127  , m_createMeshPoint(a_createMeshPoint)
128  {
129  }
130 
135 
138  double m_size;
139 
142 }; // MeRefinePoint
143 
148 {
149 public:
152  : m_polys()
153  , m_refPts()
154  , m_checkTopology(false)
155  , m_returnCellPolygons(true)
156  , m_cellPolygons()
157  {
158  }
159 
161  std::vector<MePolyInput> m_polys;
162 
164  std::vector<MeRefinePoint> m_refPts;
165 
168 
171 
172  // Output:
176 
177 }; // MeMultiPolyMesherIo
178 
179 } // namespace xms
double m_constSizeBias
Optional. Transition factor for constant size function.
std::vector< int > VecInt
std::vector< MePolyInput > m_polys
Required (but some data is optional). Inputs for each polygon.
VecPt3d2d m_insidePolys
Optional. Inner polygons (holes). Counter clockwise. 1st pt != last.
MePolyInput(const VecPt3d &a_outPoly=VecPt3d(), const VecPt3d2d &a_insidePolys=VecPt3d2d(), double a_bias=1.0, const BSHP< InterpBase > a_sizeFunction=nullptr, const VecInt &a_polyCorners=VecInt(), const BSHP< InterpBase > a_elevFunction=nullptr)
Constructor.
BSHP< InterpBase > m_elevFunction
Optional. Elevation function for interpolating z coordinate of mesh points.
bool m_createMeshPoint
Should a mesh node/point be created at the refine point.
bool m_checkTopology
Optional. If true, checks polygon input topology for errors.
A refine point used in meshing.
double m_constSizeFunction
Optional. Constant value size function.
VecInt m_cellPolygons
Polygon index of each cell.
MeRefinePoint(const Pt3d &a_pt, double a_size, bool a_createMeshPoint)
Constructor.
BSHP< InterpBase > m_sizeFunction
Optional. Size function for scalar paving.
std::string m_relaxationMethod
std::vector< MeRefinePoint > m_refPts
Optional. Refine points.
VecPt3d m_outPoly
Required. Outer polygons. Clockwise. 1st pt != last.
VecPt3d m_points
The points of the resulting mesh.
bool m_returnCellPolygons
If true, returns the polygon index of each cell.
Provides the input to meshing multiple polygons and holds the output.
std::vector< VecPt3d > VecPt3d2d
Meshing inputs for one polygon.
VecInt m_cells
The cells of the resulting mesh, as a stream.
std::vector< Pt3d > VecPt3d