00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _MxPolyhedronCellExtract_h
00024 #define _MxPolyhedronCellExtract_h
00025
00026 #include <MeshVizXLM/mesh/geometry/MiGeometryI.h>
00027
00028 #include <Inventor/STL/vector>
00029 #include <Inventor/STL/utility>
00030
00031 class MiVolumeCell;
00032
00053 class MESHVIZXLM_EXTR_API MxPolyhedronCellExtract
00054 {
00055 public:
00056
00072 static void getWeight(const MiGeometryI& meshGeometry, const MiVolumeCell* polyhedronCell, const MbVec3d &point, std::vector<double>& weights);
00073
00079 static double getLongestDistance(const MiGeometryI& meshGeometry, const MiVolumeCell* polyhedronCell);
00080
00086 static double getShortestDistance(const MiGeometryI& meshGeometry, const MiVolumeCell* polyhedronCell);
00087
00105 static bool isPointInsideCell(const MiGeometryI& meshGeometry, const MiVolumeCell* polyhedronCell, const MbVec3d &point, std::vector<double>& weights);
00106
00114 static MbVec3d getFacetNormal(size_t facet, const MiGeometryI& meshGeometry, const MiVolumeCell *polyhedronCell);
00115
00116 private:
00117
00118 static bool initClass();
00119 static void exitClass();
00120 static double cot(const MbVec3d& v1, const MbVec3d& v2);
00121
00122
00123 static bool s_isInit;
00124
00125
00126 };
00127
00128 #endif
00129
00130