Back to index

salome-paravis  6.5.0
vtkElevationSurfaceFilter.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
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 #ifndef _vtkElevationSurfaceFilter_h
00021 #define _vtkElevationSurfaceFilter_h
00022 
00023 #include "vtkAlgorithm.h"
00024 
00025 class vtkPointSet;
00026 
00027 class VTK_EXPORT vtkElevationSurfaceFilter: public vtkAlgorithm
00028 {
00029 public:
00030   static vtkElevationSurfaceFilter *New();
00031   vtkTypeRevisionMacro(vtkElevationSurfaceFilter,vtkAlgorithm);
00032   void PrintSelf(ostream& os, vtkIndent indent);
00033 
00034   // Description :
00035   // This is the factor applied to shrink the cell before extracting
00036   // the Elevation points.
00037   // A value of 0 shrinks the cells to their center, and a value of 1
00038   // do not shrink the cell at all.
00039   // default value 0.5
00040   vtkSetMacro(ScaleFactor,double);
00041   vtkGetMacro(ScaleFactor,double);
00042 
00043   // Description:
00044   // Set the direction of the deformation
00045   vtkSetVector3Macro(Direction, double);
00046   vtkGetVector3Macro(Direction, double);
00047 
00048   // Description:
00049   // If this flag is != 0, the filter will attempt detect automatically the
00050   // direction of the normal of the input.
00051   // The direction is given by the sum of the normals of all input polygons.
00052   // If there is no input poly, or if the sum is 0, it will revert to the
00053   // Direction ivar
00054   vtkBooleanMacro(AutoDetectDirection, int);
00055   vtkSetMacro(AutoDetectDirection, int);
00056   vtkGetMacro(AutoDetectDirection, int);
00057 
00058 protected:
00059   vtkElevationSurfaceFilter();
00060   ~vtkElevationSurfaceFilter();
00061 
00062   int FillInputPortInformation(int , vtkInformation* );
00063   int FillOutputPortInformation(int , vtkInformation* );
00064 
00065   int ProcessRequest(vtkInformation* ,
00066                       vtkInformationVector** ,
00067                       vtkInformationVector* );
00068 
00069 
00070   int RequestData(vtkInformation *,
00071                   vtkInformationVector **,
00072                   vtkInformationVector *);
00073 
00074   int RequestInformation(vtkInformation *,
00075                          vtkInformationVector **,
00076                          vtkInformationVector *);
00077 
00078   int RequestUpdateExtent(vtkInformation* ,
00079                           vtkInformationVector**,
00080                           vtkInformationVector*);
00081 
00082   virtual void  ComputeDirection(vtkPointSet*, double *outDir);
00083 
00084   double ScaleFactor;
00085   double Direction[3];
00086   int AutoDetectDirection;
00087 
00088 private:
00089   vtkElevationSurfaceFilter(const vtkElevationSurfaceFilter&);
00090   void operator =(const vtkElevationSurfaceFilter&);
00091 };
00092 #endif