00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _MO_MESHCLIPLINE_
00024 #define _MO_MESHCLIPLINE_
00025
00026 #include <MeshVizXLM/MbVec3.h>
00027
00028 #include <MeshVizXLM/mapping/nodes/MoMeshRepresentation.h>
00029
00030 #include <Inventor/fields/SoSFPlane.h>
00031
00032 #ifdef _WIN32
00033 #pragma warning(push)
00034 #pragma warning(disable:4251)
00035 #endif
00036
00037 class MiClipLineExtractUnstructured;
00038 class MiClipLineExtractIj;
00039 class MiSurfaceMeshUnstructured;
00040 class MiSurfaceMeshRegular;
00041 class MiSurfaceMeshRectilinear;
00042 class MiSurfaceMeshCurvilinear;
00043
00076 class MESHIVIZDM_API MoMeshClipLine : public MoMeshRepresentation {
00077
00078 SO_NODE_HEADER(MoMeshClipLine) ;
00079
00080 public:
00081
00085 MoMeshClipLine() ;
00086
00090 SoSFPlane plane;
00091
00093
00098 const MiClipLineExtractUnstructured* getUnstructuredExtractor();
00099 const MiClipLineExtractIj* getIjExtractor();
00101
00102
00103 private:
00104 static void initClass() ;
00105 static void exitClass() ;
00106
00107 private:
00108 virtual void doExtract(SoAction *action);
00109 virtual const MiMesh* getExtractedMesh(MeshType& meshType);
00110
00111
00112 virtual const MiScalardSetI* extractScalarSetI(SoState * state,size_t scalarSetId) ;
00113
00114
00115 virtual const MiVec3dSetI* extractVec3SetI(SoState * state,size_t scalarSetId) ;
00116
00117 private:
00118 virtual ~MoMeshClipLine() ;
00119
00120 virtual void clear();
00121 virtual void computePlane(MbVec3d& normal, double& distance);
00122
00123 template<typename _MeshInterface, typename _Extractor, typename _ScalarSet, typename _CellFilter>
00124 void doExtract(SoState * state,const _MeshInterface* mesh, _Extractor** extractor);
00125
00126 template<typename _Extractor, typename _ScalarSet, typename _CellFilter>
00127 void extract(SoState * state,_Extractor* extractor, const std::vector<const MiScalardSet*>& colorSets, const _CellFilter *cellFilter);
00128
00129
00130 MiClipLineExtractUnstructured* m_clipLineExtractU;
00131 MiClipLineExtractIj* m_clipLineExtractIj;
00132
00133 } ;
00134
00135 #ifdef _WIN32
00136 #pragma warning(pop)
00137 #endif
00138
00139 #endif
00140
00141
00142
00143