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_MESHGRIDPLANESLICE_
00024 #define _MO_MESHGRIDPLANESLICE_
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 MiGridPlaneSliceExtractUnstructured;
00038 class MiGridPlaneSliceExtractUnstructuredIjk;
00039 class MiGridPlaneSliceExtractIjk;
00040 class MiVolumeMeshUnstructured;
00041 class MiVolumeMeshUnstructuredIjk;
00042 class MiVolumeMeshHexahedronIjk;
00043 class MiVolumeMeshRegular;
00044 class MiVolumeMeshRectilinear;
00045 class MiVolumeMeshCurvilinear;
00046
00083 class MESHIVIZDM_API MoMeshGridPlaneSlice : public MoMeshRepresentation {
00084
00085 SO_NODE_HEADER(MoMeshGridPlaneSlice) ;
00086
00087 public:
00088
00092 MoMeshGridPlaneSlice() ;
00093
00097 SoSFPlane plane;
00098
00102 SoSFFloat step;
00103
00105
00110 const MiGridPlaneSliceExtractUnstructured* getUnstructuredExtractor();
00111 const MiGridPlaneSliceExtractUnstructuredIjk* getUnstructuredIjkExtractor();
00112 const MiGridPlaneSliceExtractIjk* getIjkExtractor();
00114
00115
00116 private:
00117 static void initClass() ;
00118 static void exitClass() ;
00119
00120 private:
00121 virtual void doExtract(SoAction *action);
00122 virtual const MiMesh* getExtractedMesh(MeshType& meshType);
00123
00124
00125
00126 const MiScalardSetIj* extractScalarSetIj(SoState * state,size_t scalarSetId) ;
00127
00128
00129
00130 const MiVec3dSetIj* extractVec3SetIj(SoState * state,size_t vec3SetId);
00131
00132 private:
00133 virtual ~MoMeshGridPlaneSlice() ;
00134
00135 virtual void clear();
00136 virtual void computePlane(MbVec3d& normal, double& distance);
00137
00138 template<typename _MeshInterface, typename _Extractor, typename _ScalarSet, typename _CellFilter>
00139 void doExtract(SoState * state,const _MeshInterface* mesh, _Extractor** extractor);
00140
00141 template<typename _Extractor, typename _ScalarSet, typename _CellFilter>
00142 void extract(SoState * state, _Extractor* extractor, const std::vector<const MiScalardSet*>& colorSets, const _CellFilter *cellFilter);
00143
00144
00145 MiGridPlaneSliceExtractUnstructured* m_gridPlaneSliceExtractU;
00146 MiGridPlaneSliceExtractUnstructuredIjk* m_gridPlaneSliceExtractUIjk;
00147 MiGridPlaneSliceExtractIjk* m_gridPlaneSliceExtractIjk;
00148
00149 } ;
00150
00151 #ifdef _WIN32
00152 #pragma warning(pop)
00153 #endif
00154
00155 #endif
00156
00157
00158
00159