00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 // VISU OBJECT : interactive object for VISU entities implementation 00021 // File : VISU_IsoSurfActor.h 00022 // Author : Vitaly Smetannikov 00023 // Module : VISU 00024 // 00025 #ifndef VISU_VectorsAct_HeaderFile 00026 #define VISU_VectorsAct_HeaderFile 00027 00028 #include "VISU_OBJECT.h" 00029 #include "VISU_ScalarMapAct.h" 00030 00031 class vtkActor2D; 00032 //class vtkMaskPoints; 00033 class vtkLabeledDataMapper; 00034 class vtkPolyData; 00035 class VISU_LabelPointsFilter; 00036 00037 00038 class VISU_OBJECT_EXPORT VISU_IsoSurfActor : public VISU_ScalarMapAct 00039 { 00040 public: 00041 vtkTypeMacro(VISU_IsoSurfActor, VISU_ScalarMapAct); 00042 00043 static VISU_IsoSurfActor* New(); 00044 00045 00046 //---------------------------------------------------------------------------- 00047 virtual void AddToRender( vtkRenderer* ); 00048 00049 virtual void RemoveFromRender( vtkRenderer* ); 00050 00051 virtual int RenderOpaqueGeometry(vtkViewport *viewport); 00052 #if (VTK_XVERSION < 0x050100) 00053 virtual int RenderTranslucentGeometry(vtkViewport *viewport); 00054 #else 00055 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport); 00056 #endif 00057 00058 //virtual void SetPipeLine(VISU_PipeLine* thePipeLine); 00059 00060 void SetLinesLabeled(bool theIsLinesLabeled, int theNbLbl); 00061 bool GetLinesLabeled() const { return myIsLinesLabeled;} 00062 00063 int GetNbLabels() const; 00064 00065 00066 //---------------------------------------------------------------------------- 00068 virtual void SetVisibility( int ); 00069 00070 00071 protected: 00072 00073 VISU_IsoSurfActor(); 00074 ~VISU_IsoSurfActor(); 00075 00076 void UpdateLabels(); 00077 00078 vtkActor2D *myLabels; 00079 vtkLabeledDataMapper* myLabeledDataMapper; 00080 //vtkMaskPoints* myMaskPoints; 00081 VISU_LabelPointsFilter* myMaskPoints; 00082 vtkPolyData* myLabelsDataSet; 00083 00084 bool myIsLinesLabeled; 00085 //int myNbLabels; 00086 }; 00087 00088 00089 #endif