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_ScalarMapPL.hxx 00025 // Author: Alexey PETROV 00026 // Module : VISU 00027 // 00028 #ifndef VISU_ScalarMapPL_HeaderFile 00029 #define VISU_ScalarMapPL_HeaderFile 00030 00031 #include "VISUPipeline.hxx" 00032 #include "VISU_MergedPL.hxx" 00033 #include "VISU_ColoredPL.hxx" 00034 #include "VISU_UnstructuredGridPL.hxx" 00035 00036 class VISU_DataSetMapperHolder; 00037 class VISU_ElnoAssembleFilter; 00038 class VISU_AppendFilter; 00039 class VISU_MergeFilter; 00040 00041 00042 //---------------------------------------------------------------------------- 00043 class VISU_PIPELINE_EXPORT VISU_ScalarMapPL : public VISU_MergedPL, 00044 public VISU_ColoredPL, 00045 public VISU_UnstructuredGridPL 00046 { 00047 public: 00048 vtkTypeMacro(VISU_ScalarMapPL, VISU_ColoredPL); 00049 00050 static 00051 VISU_ScalarMapPL* 00052 New(); 00053 00054 virtual 00055 unsigned long int 00056 GetMTime(); 00057 00058 //---------------------------------------------------------------------------- 00059 virtual 00060 void 00061 Update(); 00062 00063 virtual 00064 void 00065 SetSourceGeometry(); 00066 00067 virtual 00068 int 00069 AddGeometry(vtkDataSet* theGeometry, const VISU::TName& theGeomName); 00070 00071 virtual 00072 vtkDataSet* 00073 GetGeometry(int theGeomNumber, VISU::TName& theGeomName); 00074 00075 virtual 00076 int 00077 GetNumberOfGeometry(); 00078 00079 bool 00080 IsExternalGeometryUsed(); 00081 00082 virtual 00083 void 00084 ClearGeometry(); 00085 00086 virtual 00087 void 00088 GetSourceRange(vtkFloatingPointType theRange[2]); 00089 00090 virtual 00091 void 00092 SetGaussMetric(VISU::TGaussMetric theGaussMetric); 00093 00094 virtual 00095 VISU::TGaussMetric 00096 GetGaussMetric(); 00097 00098 //---------------------------------------------------------------------------- 00099 virtual 00100 vtkPointSet* 00101 GetMergedInput(); 00102 00103 protected: 00104 //---------------------------------------------------------------------------- 00105 VISU_ScalarMapPL(); 00106 00107 virtual 00108 ~VISU_ScalarMapPL(); 00109 00110 virtual 00111 void 00112 OnCreateMapperHolder(); 00113 00114 virtual 00115 vtkDataSet* 00116 InsertCustomPL(); 00117 00118 virtual 00119 void 00120 Build(); 00121 00122 virtual 00123 void 00124 DoShallowCopy(VISU_PipeLine *thePipeLine, 00125 bool theIsCopyInput); 00126 00127 void 00128 SetElnoDisassembleState( bool theIsShrunk ); 00129 00130 private: 00131 VISU_ScalarMapPL(const VISU_ScalarMapPL&); // Not implemented. 00132 void operator=(const VISU_ScalarMapPL&); // Not implemented. 00133 00134 vtkSmartPointer< VISU_ElnoAssembleFilter > myElnoAssembleFilter; 00135 vtkSmartPointer< VISU_AppendFilter > myAppendFilter; 00136 vtkSmartPointer< VISU_MergeFilter > myMergeFilter; 00137 }; 00138 00139 #endif