1 // Copyright (C) 2010-2020 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _vtkElevationSurfaceFilter_h
21 #define _vtkElevationSurfaceFilter_h
23 #include <vtkAlgorithm.h>
27 class VTK_EXPORT vtkElevationSurfaceFilter : public vtkAlgorithm
30 static vtkElevationSurfaceFilter* New();
31 vtkTypeMacro(vtkElevationSurfaceFilter, vtkAlgorithm);
32 void PrintSelf(ostream& os, vtkIndent indent) override;
35 // This is the factor applied to shrink the cell before extracting
36 // the Elevation points.
37 // A value of 0 shrinks the cells to their center, and a value of 1
38 // do not shrink the cell at all.
40 vtkSetMacro(ScaleFactor, double);
41 vtkGetMacro(ScaleFactor, double);
44 // Set the direction of the deformation
45 vtkSetVector3Macro(Direction, double);
46 vtkGetVector3Macro(Direction, double);
49 // If this flag is != 0, the filter will attempt detect automatically the
50 // direction of the normal of the input.
51 // The direction is given by the sum of the normals of all input polygons.
52 // If there is no input poly, or if the sum is 0, it will revert to the
54 vtkBooleanMacro(AutoDetectDirection, int);
55 vtkSetMacro(AutoDetectDirection, int);
56 vtkGetMacro(AutoDetectDirection, int);
59 vtkElevationSurfaceFilter();
60 ~vtkElevationSurfaceFilter() override;
62 int FillInputPortInformation(int, vtkInformation*) override;
63 int FillOutputPortInformation(int, vtkInformation*) override;
65 int ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
67 virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
69 virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
71 virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
73 virtual void ComputeDirection(vtkPolyData*, double* outDir);
77 int AutoDetectDirection;
80 vtkElevationSurfaceFilter(const vtkElevationSurfaceFilter&) = delete;
81 void operator=(const vtkElevationSurfaceFilter&) = delete;