00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // VISU OBJECT : interactive object for VISU entities implementation 00024 // File: VISU_PipeLine.hxx 00025 // Author: Alexey PETROV 00026 // Module : VISU 00027 // 00028 #ifndef VISU_IsoSurfacesPL_HeaderFile 00029 #define VISU_IsoSurfacesPL_HeaderFile 00030 00031 #include "VISUPipeline.hxx" 00032 #include "VISU_ScalarMapPL.hxx" 00033 00034 class vtkContourFilter; 00035 class VISU_CellDataToPointData; 00036 00037 00038 //---------------------------------------------------------------------------- 00039 class VISU_PIPELINE_EXPORT VISU_IsoSurfacesPL : public VISU_ScalarMapPL 00040 { 00041 public: 00042 vtkTypeMacro(VISU_IsoSurfacesPL, VISU_ScalarMapPL); 00043 00044 static 00045 VISU_IsoSurfacesPL* 00046 New(); 00047 00048 virtual 00049 unsigned long int 00050 GetMTime(); 00051 00052 //---------------------------------------------------------------------------- 00053 virtual 00054 int 00055 GetNbParts(); 00056 00057 virtual vtkFloatingPointType GetValue(int i); 00058 00059 virtual 00060 void 00061 SetNbParts(int theNb = 10); 00062 00063 virtual 00064 void 00065 SetScalarRange( vtkFloatingPointType theRange[2] ); 00066 00067 virtual 00068 void 00069 SetRange(vtkFloatingPointType theRange[2], bool theIsForced = false); 00070 00071 virtual 00072 vtkFloatingPointType 00073 GetMin(); 00074 00075 virtual 00076 vtkFloatingPointType 00077 GetMax(); 00078 00079 virtual 00080 void 00081 SetRangeFixed(bool theIsFixed); 00082 00083 virtual 00084 bool 00085 IsRangeFixed(); 00086 00087 public: 00088 virtual 00089 void 00090 Init(); 00091 00092 virtual 00093 void 00094 Build(); 00095 00097 virtual 00098 unsigned long int 00099 GetMemorySize(); 00100 00101 virtual 00102 vtkDataSet* 00103 InsertCustomPL(); 00104 00105 virtual 00106 void 00107 SetMapScale(vtkFloatingPointType theMapScale = 1.0); 00108 00109 protected: 00110 VISU_IsoSurfacesPL(); 00111 00112 virtual 00113 ~VISU_IsoSurfacesPL(); 00114 00115 virtual 00116 void 00117 DoShallowCopy(VISU_PipeLine *thePipeLine, 00118 bool theIsCopyInput); 00119 00120 int myNbParts; 00121 vtkFloatingPointType myRange[2]; 00122 bool myIsRangeFixed; 00123 VISU_CellDataToPointData* myCellDataToPointData; 00124 vtkContourFilter *myContourFilter; 00125 00126 private: 00127 VISU_IsoSurfacesPL(const VISU_IsoSurfacesPL&);; // Not implemented. 00128 void operator=(const VISU_IsoSurfacesPL&); // Not implemented. 00129 00130 }; 00131 00132 00133 #endif