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_MESHVECTORS_
00024 #define _MO_MESHVECTORS_
00025
00026 #include <MeshVizXLM/MbVec3.h>
00027
00028 #include <MeshVizXLM/mapping/nodes/MoMeshRepresentation.h>
00029 #include <MeshVizXLM/mapping/nodes/MoDataBinding.h>
00030
00031 #include <Inventor/fields/SoMFFloat.h>
00032
00033 #ifdef _WIN32
00034 #pragma warning(push)
00035 #pragma warning(disable:4251)
00036 #endif
00037
00038 class MiCellFilter;
00039 class MiCellFilterI;
00040 class MiMeshUnstructuredI;
00041 class SoSwitch;
00042 class MxIndexDataSetI;
00043 class MiMeshUnstructuredI;
00044
00045 class MdVectors;
00046 class MdLineVectors;
00047 class MdFancyVectors;
00048
00049
00081 class MESHVIZXLM_DMAP_API MoMeshVector : public MoMeshRepresentation {
00082
00083 SO_NODE_HEADER(MoMeshVector) ;
00084
00085 public:
00086
00090 MoMeshVector() ;
00091
00097 SoSFInt32 vectorSetId;
00098
00104 SoSFFloat scaleFactor;
00105
00120 SoSFFloat shiftFactor;
00121
00139 SoSFFloat thicknessFactor;
00140
00145 SoSFBool arrow;
00146
00147
00148 private:
00149 static void initClass() ;
00150 static void exitClass() ;
00151
00152 private:
00153 virtual void doExtract(SoAction * action);
00154
00155
00156 virtual const MiMesh* getExtractedMesh(MeshType& SO_UNUSED_PARAM(meshType)) { return NULL;}
00157
00158 private:
00159 virtual ~MoMeshVector() ;
00160
00161 void clear();
00162
00163 void doExtract(SoState* state, const MiMeshUnstructuredI& realMesh);
00164
00165 template < typename _adaptorT, typename _MeshIjT>
00166 void doExtractSurfaceIj(SoState* state, _MeshIjT& realMesh);
00167
00168 template < typename _adaptorT, typename _MeshIjkT>
00169 void doExtractVolumeIjk(SoState* state, _MeshIjkT& realMesh, MoDataBinding::DataBinding* dataBinding = NULL);
00170
00171 void buildVectors(SoState* state, const MiMeshUnstructuredI& uMesh, const MiVec3dSetI& vec3,
00172 const MiScalardSetI* colorSet, const MiCellFilterI* filter=NULL);
00173
00174 bool haveValuesChanged(size_t topoTimeStamp, size_t geoTimeStamp, size_t vec3TimeStamp,
00175 SoState* state, const MiDataSet* colorSet, const MiCellFilter* filter=NULL);
00176
00177 size_t m_topoTimeStamp;
00178 size_t m_geoTimeStamp;
00179 size_t m_vec3TimeStamp;
00180 size_t m_colorTimeStamp;
00181 size_t m_colorMapTimeStamp;
00182 size_t m_cellFilterTimeStamp;
00183 float m_scaleFactor;
00184 float m_shiftFactor;
00185 bool m_arrow;
00186
00187 SoSwitch* m_switchModel;
00188 MxIndexDataSetI* m_indexList;
00189 MdVectors* m_currentVectors;
00190 MdLineVectors* m_lineVectors;
00191 MdFancyVectors* m_fancyVectors;
00192 } ;
00193
00194 #ifdef _WIN32
00195 #pragma warning(pop)
00196 #endif
00197
00198 #endif
00199
00200
00201
00202