xmsmesh  1.0
MeMeshUtils.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
10 
11 //----- Included files ---------------------------------------------------------
12 #include <string>
13 #include <vector>
14 
15 #include <xmscore/stl/set.h>
16 #include <xmscore/stl/vector.h>
17 #include <xmscore/misc/boost_defines.h> // for BSHP
18 #include <xmscore/misc/DynBitset.h> // for DynBitset
19 
20 //----- Forward declarations ---------------------------------------------------
21 class vtkUnstructuredGrid;
22 
23 //----- Namespace declaration --------------------------------------------------
24 namespace xms
25 {
26 //----- Forward declarations ---------------------------------------------------
27 class TrTin;
28 
29 //----- Constants / Enumerations -----------------------------------------------
30 
31 //----- Structs / Classes ------------------------------------------------------
32 
33 //----- Function prototypes ----------------------------------------------------
34 void meSizeFunctionFromDepth(const VecDbl& a_depths,
35  VecDbl& a_size,
36  double a_minSize,
37  double a_maxSize);
38 void meSmoothSizeFunction(BSHP<TrTin> a_tin,
39  const VecFlt& a_sizes,
40  double a_sizeRatio,
41  double a_minSize,
42  int a_anchorType,
43  const DynBitset& a_ptFlags,
44  VecFlt& a_smoothSize);
45 void meSmoothElevBySlope(BSHP<TrTin> a_tin,
46  const VecFlt& a_sizes,
47  double a_maxSize,
48  int a_anchorType,
49  const DynBitset& a_ptFlags,
50  VecFlt& a_smoothSize);
51 void meModifyMessageWithPolygonId(int a_polyId, std::string& a_msg);
52 } // namespace xms
std::vector< double > VecDbl
std::vector< float > VecFlt
void meSizeFunctionFromDepth(const VecDbl &a_depths, VecDbl &a_size, double a_minSize, double a_maxSize)
Creates a size at each point based on the depth at the point and the min and max sizes the equation i...
void meSmoothSizeFunction(BSHP< TrTin > a_tin, const VecFlt &a_sizes, double a_sizeRatio, double a_minSize, int a_anchorType, const DynBitset &a_ptsFlag, VecFlt &a_smoothSize)
Smooths a size function. Ensures that the size function transitions over a sufficient distance so tha...
boost::dynamic_bitset< size_t > DynBitset
void meModifyMessageWithPolygonId(int a_polyId, std::string &a_msg)
Prepends the polygon id as part of an error messge.
void meSmoothElevBySlope(BSHP< TrTin > a_tin, const VecFlt &a_elevs, double a_maxSlope, int a_anchorType, const DynBitset &a_ptsFlag, VecFlt &a_smoothElevs)
Smooths a elevations based on max specified slope (a_maxSlope) preserving either the min or max based...