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_MESHLOGICALSLICE_
00024 #define _MO_MESHLOGICALSLICE_
00025
00026 #include <MeshVizXLM/mesh/MiSurfaceMeshUnstructured.h>
00027 #include <MeshVizXLM/extractors/MiBaseLogicalSliceExtract.h>
00028 #include <MeshVizXLM/MbVec3.h>
00029
00030 #include <MeshVizXLM/mapping/nodes/MoMeshRepresentation.h>
00031
00032 #include <Inventor/fields/SoSFUInt32.h>
00033
00034 #ifdef _WIN32
00035 #pragma warning(push)
00036 #pragma warning(disable:4251)
00037 #pragma warning(disable:4996)
00038 #endif
00039
00040 class MiLogicalSliceExtractUnstructuredIjk;
00041 class MiLogicalSliceExtractRegular;
00042 class MiLogicalSliceExtractRectilinear;
00043 class MiLogicalSliceExtractCurvilinear;
00044 class MiVolumeMeshUnstructured;
00045 class MiVolumeMeshUnstructuredIjk;
00046 class MiVolumeMeshHexahedronIjk;
00047 class MiVolumeMeshRegular;
00048 class MiVolumeMeshRectilinear;
00049 class MiVolumeMeshCurvilinear;
00050 class MiCellFilterIjk;
00051
00101 class MESHIVIZDM_API MoMeshLogicalSlice : public MoMeshRepresentation {
00102
00103 SO_NODE_HEADER(MoMeshLogicalSlice) ;
00104
00105 public:
00106
00110 MoMeshLogicalSlice() ;
00111
00115 SoSFUInt32 sliceIndex;
00116
00121 SoSFEnum sliceAxis;
00122
00126 SoSFBool upperVertex;
00127
00135 const MiLogicalSliceExtractRegular* getRegularExtractor();
00136 const MiLogicalSliceExtractRectilinear* getRectilinearExtractor();
00137 const MiLogicalSliceExtractCurvilinear* getCurvilinearExtractor();
00138 const MiLogicalSliceExtractUnstructuredIjk* getUnstructuredIjkExtractor();
00139
00140 #if 1 class SoDEPRECATED SliceAxis
00143 {
00144 public:
00145 static const MiMesh::Dimension SLICE_I = MiMesh::DIMENSION_I;
00146 static const MiMesh::Dimension SLICE_J = MiMesh::DIMENSION_J;
00147 static const MiMesh::Dimension SLICE_K = MiMesh::DIMENSION_K;
00149
00150 SliceAxis() : m_axis(MiMesh::DIMENSION_I) {}
00151 SliceAxis(MiMesh::Dimension a) : m_axis(a) {}
00152 SliceAxis(int a) : m_axis((MiMesh::Dimension)a) {}
00153 SliceAxis(size_t a) : m_axis((MiMesh::Dimension)a) {}
00154 operator MiMesh::Dimension() const { return m_axis; }
00155
00156 private:
00157 MiMesh::Dimension m_axis;
00158 };
00159 SoDEPRECATED
00161 static const MiMesh::Dimension SLICE_I = MiMesh::DIMENSION_I; SoDEPRECATED
00164 static const MiMesh::Dimension SLICE_J = MiMesh::DIMENSION_J; SoDEPRECATED
00167 static const MiMesh::Dimension SLICE_K = MiMesh::DIMENSION_K;
00169 #endif
00171
00172 private:
00173 static void initClass() ;
00174 static void exitClass() ;
00175
00176 private:
00177 virtual void doExtract(SoAction *action);
00178 virtual const MiMesh* getExtractedMesh(MeshType& meshType);
00179
00180
00181 virtual const MiScalardSetI* extractScalarSetI(SoState * state,size_t scalarSetId) ;
00182 virtual const MiScalardSetIj* extractScalarSetIj(SoState * state,size_t scalarSetId) ;
00183
00184
00185 virtual const MiVec3dSetI* extractVec3SetI(SoState * state,size_t scalarSetId) ;
00186 virtual const MiVec3dSetIj* extractVec3SetIj(SoState * state,size_t scalarSetId) ;
00187
00188 private:
00189 virtual ~MoMeshLogicalSlice() ;
00190
00191 virtual void clear();
00192
00193 template<typename _MeshInterface, typename _Extractor, typename _OutputMeshInterface, typename _InputScalarSet, typename _OutputScalarSet>
00194 void doExtract(SoState * state,const _MeshInterface* mesh, _Extractor** extractor);
00195
00196 template<typename _Extractor,typename _OutputMeshInterface, typename _InputScalarSet, typename _OutputScalarSet>
00197 void extract(SoState * state, _Extractor* extractor, const std::vector<const MiScalardSet*>& colorSets, const MiCellFilterIjk *cellFilter);
00198
00199
00200 MiLogicalSliceExtractRegular* m_logicalSliceExtractRegular;
00201 MiLogicalSliceExtractRectilinear* m_logicalSliceExtractRectilinear;
00202 MiLogicalSliceExtractCurvilinear* m_logicalSliceExtractCurvilinear;
00203 MiLogicalSliceExtractUnstructuredIjk* m_logicalSliceExtractUIjk;
00204
00205 } ;
00206
00207 #ifdef _WIN32
00208 #pragma warning(pop)
00209 #endif
00210
00211 #endif
00212
00213
00214
00215