00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _MO_LINEMESH_
00022 #define _MO_LINEMESH_
00023
00024 #include <MeshVizXLM/mapping/nodes/MoMeshBaseRepresentation.h>
00025
00026 #include <MeshVizXLM/mesh/data/MiDataSetI.h>
00027 #include <MeshVizXLM/extrmesh/data/MeXDataSetI.h>
00028
00029 #ifdef _WIN32
00030 #pragma warning(push)
00031 #pragma warning(disable:4251)
00032 #endif
00033
00034 class SoState;
00035 class SoShaderProgram;
00036
00037 class MeXLineMeshUnstructured;
00038 class MeXLineMeshCurvilinear;
00039 class MiLineMeshUnstructured;
00040 class MiLineMeshRegular;
00041 class MiLineMeshCurvilinear;
00042 class MiMesh;
00043
00044 class MdLineMesh;
00045
00071 class MESHIVIZDM_API SoDEPRECATED_CLASS(9600,"Use MoMeshLine instead.") MoLineMesh : public MoMeshBaseRepresentation {
00072
00073 SO_NODE_HEADER(MoLineMesh) ;
00074
00075 public:
00076
00080 MoLineMesh() ;
00081
00083
00087 void setLineMesh(const MeXLineMeshUnstructured* mesh, const MeXScalardSetI* scalarSet = NULL);
00088 void setLineMesh(const MeXLineMeshCurvilinear* mesh, const MeXScalardSetI* scalarSet = NULL);
00089
00090 void setLineMesh(const MiLineMeshUnstructured* mesh, const MiScalardSetI* scalarSet = NULL);
00091 void setLineMesh(const MiLineMeshRegular* mesh, const MiScalardSetI* scalarSet = NULL);
00092 void setLineMesh(const MiLineMeshCurvilinear* mesh, const MiScalardSetI* scalarSet = NULL);
00094
00098 void clear();
00099
00100
00101 private:
00102 static void initClass() ;
00103 static void exitClass() ;
00104 MoLineMesh(bool pointsFading) ;
00105 SoShaderProgram* getFadingShaderProgram() const;
00106
00107 void setLineMesh(const MeXLineMeshUnstructured* mesh, std::vector<const MeXScalardSetI*>& scalarSets);
00108 void setLineMesh(const MeXLineMeshCurvilinear* mesh, std::vector<const MeXScalardSetI*>& scalarSets);
00109
00110 private:
00111 virtual void rayPick(SoRayPickAction *action);
00112 virtual void doAction(SoAction * action);
00113 virtual const MiMesh* getExtractedMesh(MeshType& meshType);
00114 void setIgnoreExtraStyle(bool ignore = true);
00115 template< typename _MeshT, typename _ScalarSetT>
00116 void setMesh(const _MeshT* mesh, const _ScalarSetT* scalarSet = NULL)
00117 {
00118 setLineMesh(mesh,scalarSet);
00119 }
00120
00121 private:
00122 virtual ~MoLineMesh() ;
00123
00124 MdLineMesh* m_nodeImpl;
00125 } ;
00126
00127 #ifdef _WIN32
00128 #pragma warning(pop)
00129 #endif
00130
00131 #endif
00132