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 // File : VISU_DeformationPL.hxx 00021 // Author : 00022 // Module : SALOME 00023 // 00024 #ifndef VISU_DeformationPL_HeaderFile 00025 #define VISU_DeformationPL_HeaderFile 00026 00027 #include "VISUPipeline.hxx" 00028 #include "VISU_MapperHolder.hxx" 00029 #include <vtkSmartPointer.h> 00030 00031 class vtkDataSet; 00032 class VISU_MergeFilter; 00033 class vtkPassThroughFilter; 00034 class vtkWarpVector; 00035 class VISU_CellDataToPointData; 00036 00037 class VISU_PIPELINE_EXPORT VISU_DeformationPL { 00038 00039 public: 00040 VISU_DeformationPL(); 00041 virtual ~VISU_DeformationPL(); 00042 00043 //----------------------------------------------------------- 00044 virtual void SetScale(vtkFloatingPointType theScaleFactor); 00045 virtual void SetMapScale(vtkFloatingPointType theMapScaleFactor); 00046 virtual vtkFloatingPointType GetScale(); 00047 00048 //----------------------------------------------------------- 00049 virtual void SetVectorialField(VISU::PUnstructuredGridIDMapper theIdMapper) = 0; 00050 virtual VISU::PUnstructuredGridIDMapper getVectorialField() = 0; 00051 00052 00053 //----------------------------------------------------------- 00054 virtual 00055 unsigned 00056 long int 00057 GetMTime(); 00058 00059 static vtkFloatingPointType GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine); 00060 00061 void SetWarpVectorInput(vtkDataSet *theInput); 00062 vtkDataSet* GetWarpVectorOutput(); 00063 00064 //----------------------------------------------------------- 00065 void SetMergeFilterInput(vtkDataSet* ScalarInput, 00066 vtkDataSet* VectorialInput); 00067 00068 vtkDataSet* GetMergeFilterOutput(); 00069 00070 protected: 00071 00072 VISU::PUnstructuredGridIDMapper myVectorialField; 00073 vtkWarpVector *myWarpVector; 00074 vtkSmartPointer<VISU_MergeFilter> myVectorMergeFilter; 00075 vtkPassThroughFilter *myInputPassFilter; 00076 vtkPassThroughFilter *myOutputPassFiler; 00077 VISU_CellDataToPointData *myCellDataToPointData; 00078 00079 private: 00080 vtkFloatingPointType myScaleFactor; 00081 vtkFloatingPointType myMapScaleFactor; 00082 00083 }; 00084 00085 #endif