00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _MxPolygonCellExtract_h
00024 #define _MxPolygonCellExtract_h
00025
00026 #include <MeshVizXLM/mesh/geometry/MiGeometryI.h>
00027
00028 #include <Inventor/STL/vector>
00029 #include <Inventor/STL/utility>
00030
00031 class MiSurfaceCell;
00032
00048 class MESHVIZXLM_EXTR_API MxPolygonCellExtract
00049 {
00050 public:
00051
00069 static void getWeight(const MiGeometryI& meshGeometry, const MiSurfaceCell* polygonCell, const MbVec3d &point, std::vector<double>& weights);
00070
00074 static double getLongestEdgeLength(const MiGeometryI& meshGeometry, const MiSurfaceCell* polygonCell);
00075
00079 static double getShortestEdgeLength(const MiGeometryI& meshGeometry, const MiSurfaceCell* polygonCell);
00080
00096 static bool isPointInsideCell(const MiGeometryI& meshGeometry, const MiSurfaceCell* polygonCell, const MbVec3d &point, std::vector<double>& weights);
00097
00103 static double getArea(const MiGeometryI& meshGeometry, const MiSurfaceCell* polygonCell);
00104
00111 static MbVec3d getNormal(const MiGeometryI& meshGeometry, const MiSurfaceCell *polygonCell);
00112
00113 private:
00114
00115 static bool initClass();
00116 static void exitClass();
00117 static double cot(const MbVec3d& v1, const MbVec3d& v2, const MbVec3d& normal);
00118
00119 static bool s_isInit;
00120
00121 };
00122
00123 #endif
00124
00125