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 "vtkFiltersGeneralModule.h" // For export macro
40 #include "vtkPolyDataAlgorithm.h"
41 
42 #include "vtkDataSetAttributes.h" // Needed for CopyCells() method
43 
44 class vtkIdList;
45 
47 {
48 public:
51 
54 
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58  {
59  VTK_UNION=0,
61  VTK_DIFFERENCE
62  };
63 
65 
66  vtkSetClampMacro( Operation, int, VTK_UNION, VTK_DIFFERENCE );
67  vtkGetMacro( Operation, int );
69  { this->SetOperation( VTK_UNION ); }
71  { this->SetOperation( VTK_INTERSECTION ); }
73  { this->SetOperation( VTK_DIFFERENCE ); }
75 
77 
79  vtkSetMacro( ReorientDifferenceCells, int );
80  vtkGetMacro( ReorientDifferenceCells, int );
81  vtkBooleanMacro( ReorientDifferenceCells, int );
83 
85 
87  vtkSetMacro(Tolerance, double);
88  vtkGetMacro(Tolerance, double);
90 
91 protected:
94 
96 
98  void SortPolyData(vtkPolyData* input, vtkIdList* intersectionList,
99  vtkIdList* unionList);
101 
104 
105 private:
107  void operator=(const vtkBooleanOperationPolyDataFilter&); // Not implemented
108 
110 
113  void CopyCells(vtkPolyData* in, vtkPolyData* out, int idx,
114  vtkDataSetAttributes::FieldList & pointFieldList,
115  vtkDataSetAttributes::FieldList & cellFieldList,
116  vtkIdList* cellIds, bool reverseCells);
118 
121  double Tolerance;
122 
125  int Operation;
126 
128 
130  int ReorientDifferenceCells;
131 };
133 
134 #endif
virtual int FillInputPortInformation(int port, vtkInformation *info)
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
#define VTKFILTERSGENERAL_EXPORT
Store zero or more vtkInformation instances.