1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkSubdivisionFilter.h
5 
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /**
16  * @class   vtkSubdivisionFilter
17  * @brief   base class for subvision filters
18  *
19  * vtkSubdivisionFilter is an abstract class that defines
20  * the protocol for subdivision surface filters.
21  *
22  */
23 
24 #ifndef vtkSubdivisionFilter_h
25 #define vtkSubdivisionFilter_h
26 
27 #include "vtkFiltersGeneralModule.h" // For export macro
28 #include "vtkPolyDataAlgorithm.h"
29 
30 class vtkCellArray;
31 class vtkCellData;
32 class vtkIdList;
33 class vtkIntArray;
34 class vtkPoints;
35 class vtkPointData;
36 
37 class VTKFILTERSGENERAL_EXPORT vtkSubdivisionFilter : public vtkPolyDataAlgorithm
38 {
39 public:
40   vtkTypeMacro(vtkSubdivisionFilter, vtkPolyDataAlgorithm);
41   void PrintSelf(ostream& os, vtkIndent indent) override;
42 
43   ///@{
44   /**
45    * Set/get the number of subdivisions.
46    * Default is 1.
47    */
48   vtkSetMacro(NumberOfSubdivisions, int);
49   vtkGetMacro(NumberOfSubdivisions, int);
50   ///@}
51 
52   ///@{
53   /**
54    * Set/get CheckForTriangles
55    * Should subdivision check that the dataset only contains triangles?
56    * Default is On (1).
57    */
58   vtkSetClampMacro(CheckForTriangles, vtkTypeBool, 0, 1);
59   vtkGetMacro(CheckForTriangles, vtkTypeBool);
60   vtkBooleanMacro(CheckForTriangles, vtkTypeBool);
61   ///@}
62 
63 protected:
64   vtkSubdivisionFilter();
65   ~vtkSubdivisionFilter() override = default;
66 
67   int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
68 
69   int NumberOfSubdivisions;
70   vtkTypeBool CheckForTriangles;
71 
72 private:
73   vtkSubdivisionFilter(const vtkSubdivisionFilter&) = delete;
74   void operator=(const vtkSubdivisionFilter&) = delete;
75 };
76 
77 #endif
78