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 =========================================================================*/
36 #ifndef __vtkBooleanOperationPolyDataFilter_h
37 #define __vtkBooleanOperationPolyDataFilter_h
38 
39 #include "vtkPolyDataAlgorithm.h"
40 
41 #include "vtkDataSetAttributes.h" // Needed for CopyCells() method
42 
43 class vtkIdList;
44 
46 {
47 public:
50 
53 
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57  {
61  };
62 
64 
65  vtkSetClampMacro( Operation, int, VTK_UNION, VTK_DIFFERENCE );
66  vtkGetMacro( Operation, int );
67  void SetOperationToUnion()
68  { this->SetOperation( VTK_UNION ); }
69  void SetOperationToIntersection()
70  { this->SetOperation( VTK_INTERSECTION ); }
71  void SetOperationToDifference()
72  { this->SetOperation( VTK_DIFFERENCE ); }
74 
76 
78  vtkSetMacro( ReorientDifferenceCells, int );
79  vtkGetMacro( ReorientDifferenceCells, int );
80  vtkBooleanMacro( ReorientDifferenceCells, int );
82 
84 
86  vtkSetMacro(Tolerance, double);
87  vtkGetMacro(Tolerance, double);
89 
90 protected:
93 
95 
97  void SortPolyData(vtkPolyData* input, vtkIdList* intersectionList,
98  vtkIdList* unionList);
100 
103 
104 private:
106  void operator=(const vtkBooleanOperationPolyDataFilter&); // Not implemented
107 
109 
112  void CopyCells(vtkPolyData* in, vtkPolyData* out, int idx,
113  vtkDataSetAttributes::FieldList & pointFieldList,
114  vtkDataSetAttributes::FieldList & cellFieldList,
115  vtkIdList* cellIds, bool reverseCells);
117 
120  double Tolerance;
121 
124  int Operation;
125 
127 
129  int ReorientDifferenceCells;
130 };
132 
133 #endif