00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _MO_SURFACEMESH_
00022 #define _MO_SURFACEMESH_
00023
00024 #include <MeshVizXLM/mapping/nodes/MoMeshBaseRepresentation.h>
00025
00026 #include <MeshVizXLM/mesh/data/MiDataSetI.h>
00027 #include <MeshVizXLM/mesh/data/MiDataSetIj.h>
00028 #include <MeshVizXLM/extrmesh/data/MeXDataSetI.h>
00029 #include <MeshVizXLM/extrmesh/data/MeXDataSetIj.h>
00030
00031 #ifdef _WIN32
00032 #pragma warning(push)
00033 #pragma warning(disable:4251)
00034 #endif
00035
00036 class SoState;
00037 class SoAction;
00038 class SoShaderProgram;
00039
00040 class MeXSurfaceMeshUnstructured;
00041 class MeXSurfaceMeshRegular;
00042 class MeXSurfaceMeshRectilinear;
00043 class MeXSurfaceMeshCurvilinear;
00044 class MiSurfaceMeshUnstructured;
00045 class MiSurfaceMeshRegular;
00046 class MiSurfaceMeshRectilinear;
00047 class MiSurfaceMeshCurvilinear;
00048 class MiMesh;
00049
00050 class MdSurfaceMesh;
00051
00074 class MESHIVIZDM_API SoDEPRECATED_CLASS(9600,"Use MoMeshSurface instead.") MoSurfaceMesh : public MoMeshBaseRepresentation {
00075
00076 SO_NODE_HEADER(MoSurfaceMesh) ;
00077
00078 public:
00079
00083 MoSurfaceMesh() ;
00084
00086
00090 void setSurfaceMesh(const MeXSurfaceMeshUnstructured* mesh, const MeXScalardSetI* scalarSet = NULL);
00091 void setSurfaceMesh(const MeXSurfaceMeshRegular* mesh, const MeXScalardSetIj* scalarSet = NULL);
00092 void setSurfaceMesh(const MeXSurfaceMeshRectilinear* mesh, const MeXScalardSetIj* scalarSet = NULL);
00093 void setSurfaceMesh(const MeXSurfaceMeshCurvilinear* mesh, const MeXScalardSetIj* scalarSet = NULL);
00094
00095 void setSurfaceMesh(const MiSurfaceMeshUnstructured* mesh, const MiScalardSetI* scalarSet = NULL);
00096 void setSurfaceMesh(const MiSurfaceMeshRegular* mesh, const MiScalardSetIj* scalarSet = NULL);
00097 void setSurfaceMesh(const MiSurfaceMeshRectilinear* mesh, const MiScalardSetIj* scalarSet = NULL);
00098 void setSurfaceMesh(const MiSurfaceMeshCurvilinear* mesh, const MiScalardSetIj* scalarSet = NULL);
00100
00109 void setOverallNormal(const SbVec3f& normal);
00110
00112
00121 void setNormalDataSet(const MiVec3dSetI* normalSet);
00122 void setNormalDataSet(const MiVec3dSetIj* normalSet);
00124
00128 void clear();
00129
00130
00131 private:
00132 static void initClass() ;
00133 static void exitClass() ;
00134 SoShaderProgram* getFadingShaderProgram() const;
00135
00136 void setSurfaceMesh(const MeXSurfaceMeshUnstructured* mesh, std::vector< const MeXScalardSetI*>& scalarSets);
00137 void setSurfaceMesh(const MeXSurfaceMeshRegular* mesh, std::vector< const MeXScalardSetIj*>& scalarSets);
00138 void setSurfaceMesh(const MeXSurfaceMeshRectilinear* mesh, std::vector< const MeXScalardSetIj*>& scalarSets);
00139 void setSurfaceMesh(const MeXSurfaceMeshCurvilinear* mesh, std::vector< const MeXScalardSetIj*>& scalarSets);
00140
00141 private:
00142 virtual void rayPick(SoRayPickAction * action);
00143 virtual void doAction(SoAction * action);
00144 virtual const MiMesh* getExtractedMesh(MeshType& meshType);
00145 void setIgnoreExtraStyle(bool ignore = true);
00146 template< typename _MeshT, typename _ScalarSetT>
00147 void setMesh(const _MeshT* mesh, const _ScalarSetT* scalarSet = NULL)
00148 {
00149 setSurfaceMesh(mesh,scalarSet);
00150 }
00151
00152 private:
00153 virtual ~MoSurfaceMesh() ;
00154
00155 MdSurfaceMesh* m_nodeImpl;
00156
00157 } ;
00158
00159 #ifdef _WIN32
00160 #pragma warning(pop)
00161 #endif
00162
00163 #endif
00164
00165
00166
00167
00168