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_MESHSTREAMLINE_
00024 #define _MO_MESHSTREAMLINE_
00025
00026 #include <MeshVizXLM/MbVec3.h>
00027
00028 #include <MeshVizXLM/mapping/nodes/MoMeshRepresentation.h>
00029
00030 #include <Inventor/fields/SoSFDouble.h>
00031 #include <Inventor/fields/SoMFFloat.h>
00032 #include <Inventor/fields/SoMFVec3f.h>
00033 #include <Inventor/fields/SoSFInt32.h>
00034
00035 #ifdef _WIN32
00036 #pragma warning(push)
00037 #pragma warning(disable:4251)
00038 #endif
00039
00040 class MiStreamlineExtractUnstructured;
00041 class MiStreamlineExtractUnstructuredIjk;
00042 class MiStreamlineExtractIjk;
00043 class MiVolumeMeshUnstructured;
00044 class MiVolumeMeshUnstructuredIjk;
00045 class MiVolumeMeshHexahedronIjk;
00046 class MiVolumeMeshRegular;
00047 class MiVolumeMeshRectilinear;
00048 class MiVolumeMeshCurvilinear;
00049
00050 class MeLineMeshSet;
00051 class MeSetOfVec3dSetI;
00052 class MeSetOfScalardSetI;
00053
00102 class MESHIVIZDM_API MoMeshStreamline : public MoMeshRepresentation {
00103
00104 SO_NODE_HEADER(MoMeshStreamline) ;
00105
00106 public:
00107
00111 MoMeshStreamline() ;
00112
00119 SoSFInt32 vec3SetId;
00120
00124 SoMFVec3f startingPoints;
00125
00130 SoSFDouble maxLifeTime;
00131
00136 SoSFDouble maxLength;
00137
00142 SoSFDouble minSpeed;
00143
00148 SoSFDouble integrationStepLengthFactor;
00149
00154 SoSFInt32 maxStepNumber;
00155
00159 enum IntegrationDirection {
00160 FORWARD,
00161 BACKWARD
00162 } ;
00163
00168 SoSFEnum direction;
00169
00171
00178 const MiStreamlineExtractUnstructured* getUnstructuredExtractor();
00179 const MiStreamlineExtractUnstructuredIjk* getUnstructuredIjkExtractor();
00180 const MiStreamlineExtractIjk* getIjkExtractor();
00182
00183
00184 private:
00185 static void initClass() ;
00186 static void exitClass() ;
00187
00188 private:
00189 virtual void doExtract(SoAction * action);
00190 virtual const MiMesh* getExtractedMesh(MeshType& meshType);
00191
00192
00193 virtual const MiScalardSetI* extractScalarSetI(SoState * state,size_t scalarSetId) ;
00194
00195
00196 virtual const MiVec3dSetI* extractVec3SetI(SoState * state,size_t vectorSetId) ;
00197
00198 private:
00199 virtual ~MoMeshStreamline() ;
00200
00201 void clear();
00202 template<typename _Extractor>
00203 void setParameters(_Extractor& extractor);
00204 void getStartPointList(std::vector<MbVec3d> &startPointList);
00205
00206 template<typename _MeshInterface, typename _Extractor, typename _ScalarSet, typename _Vec3Set, typename _CellFilter>
00207 void doExtract(SoState * state,const _MeshInterface* mesh, _Extractor** extractor);
00208
00209 template<typename _Extractor, typename _ScalarSet, typename _Vec3Set, typename _CellFilter>
00210 void extract(SoState * state, _Extractor* extractor, const std::vector<const MiScalardSet*>& colorSets, const _CellFilter *cellFilter);
00211
00212
00213 MiStreamlineExtractUnstructured* m_streamlineExtractU;
00214 MiStreamlineExtractUnstructuredIjk* m_streamlineExtractUIjk;
00215 MiStreamlineExtractIjk* m_streamlineExtractIjk;
00216
00217
00218 MeLineMeshSet* m_streamlineSet;
00219 MeSetOfVec3dSetI* m_setOfVec3Set;
00220 MeSetOfScalardSetI* m_setOfScalarSet;
00221
00222 } ;
00223
00224 #ifdef _WIN32
00225 #pragma warning(pop)
00226 #endif
00227
00228 #endif
00229
00230
00231
00232