VTK
vtkBooleanOperationPolyDataFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBooleanOperationPolyDataFilter.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 =========================================================================*/
34 #ifndef vtkBooleanOperationPolyDataFilter_h
35 #define vtkBooleanOperationPolyDataFilter_h
36 
37 #include "vtkFiltersGeneralModule.h" // For export macro
38 #include "vtkPolyDataAlgorithm.h"
39 
40 #include "vtkDataSetAttributes.h" // Needed for CopyCells() method
41 
42 class vtkIdList;
43 
44 class VTKFILTERSGENERAL_EXPORT vtkBooleanOperationPolyDataFilter : public vtkPolyDataAlgorithm
45 {
46 public:
51 
54 
55  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
56 
58  {
59  VTK_UNION=0,
61  VTK_DIFFERENCE
62  };
63 
65 
68  vtkSetClampMacro( Operation, int, VTK_UNION, VTK_DIFFERENCE );
69  vtkGetMacro( Operation, int );
71  { this->SetOperation( VTK_UNION ); }
73  { this->SetOperation( VTK_INTERSECTION ); }
75  { this->SetOperation( VTK_DIFFERENCE ); }
77 
79 
83  vtkSetMacro( ReorientDifferenceCells, int );
84  vtkGetMacro( ReorientDifferenceCells, int );
85  vtkBooleanMacro( ReorientDifferenceCells, int );
87 
89 
93  vtkSetMacro(Tolerance, double);
94  vtkGetMacro(Tolerance, double);
96 
97 protected:
99  ~vtkBooleanOperationPolyDataFilter() VTK_OVERRIDE;
100 
104  void SortPolyData(vtkPolyData* input, vtkIdList* intersectionList,
105  vtkIdList* unionList);
106 
107  int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
108  int FillInputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
109 
110 private:
112  void operator=(const vtkBooleanOperationPolyDataFilter&) VTK_DELETE_FUNCTION;
113 
119  void CopyCells(vtkPolyData* in, vtkPolyData* out, int idx,
120  vtkDataSetAttributes::FieldList & pointFieldList,
121  vtkDataSetAttributes::FieldList & cellFieldList,
122  vtkIdList* cellIds, bool reverseCells);
123 
128  double Tolerance;
129 
134  int Operation;
135 
137 
141  int ReorientDifferenceCells;
142 };
144 
145 #endif
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
void SetOperationToIntersection()
Set the boolean operation to perform.
list of point or cell ids
Definition: vtkIdList.h:30
represent and manipulate attribute data in a dataset
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetOperationToUnion()
Set the boolean operation to perform.
Computes the boundary of the union, intersection, or difference volume computed from the volumes defi...
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetOperationToDifference()
Set the boolean operation to perform.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.