VTK
vtkIntersectionPolyDataFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkIntersectionPolyDataFilter.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 =========================================================================*/
63 #ifndef vtkIntersectionPolyDataFilter_h
64 #define vtkIntersectionPolyDataFilter_h
65 
66 #include "vtkFiltersGeneralModule.h" // For export macro
67 #include "vtkPolyDataAlgorithm.h"
68 
69 class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter :
71 {
72 public:
75  void PrintSelf(ostream &os, vtkIndent indent) override;
76 
78 
81  vtkGetMacro(NumberOfIntersectionPoints, int);
82  vtkGetMacro(NumberOfIntersectionLines, int);
84 
86 
90  vtkGetMacro(SplitFirstOutput, vtkTypeBool);
91  vtkSetMacro(SplitFirstOutput, vtkTypeBool);
92  vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
94 
96 
100  vtkGetMacro(SplitSecondOutput, vtkTypeBool);
101  vtkSetMacro(SplitSecondOutput, vtkTypeBool);
102  vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
104 
106 
110  vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
111  vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
112  vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
114 
116 
119  vtkGetMacro(CheckInput, vtkTypeBool);
120  vtkSetMacro(CheckInput, vtkTypeBool);
121  vtkBooleanMacro(CheckInput, vtkTypeBool);
123 
125 
129  vtkGetMacro(CheckMesh, vtkTypeBool);
130  vtkSetMacro(CheckMesh, vtkTypeBool);
131  vtkBooleanMacro(CheckMesh, vtkTypeBool);
133 
135 
140  vtkGetMacro(Status, int);
142 
144 
147  vtkGetMacro(Tolerance, double);
148  vtkSetMacro(Tolerance, double);
150 
152 
157  vtkGetMacro(RelativeSubtriangleArea, double);
158  vtkSetMacro(RelativeSubtriangleArea, double);
160 
171  static int TriangleTriangleIntersection(double p1[3], double q1[3],
172  double r1[3], double p2[3],
173  double q2[3], double r2[3],
174  int &coplanar, double pt1[3],
175  double pt2[3], double surfaceid[2],
176  double tolerance);
177 
182  static void CleanAndCheckSurface(vtkPolyData *pd, double stats[2],
183  double tolerance);
184 
188  static void CleanAndCheckInput(vtkPolyData *pd, double tolerance);
189 
190 
191 protected:
192  vtkIntersectionPolyDataFilter(); //Constructor
193  ~vtkIntersectionPolyDataFilter() override; //Destructor
194 
196  vtkInformationVector*) override; //Update
197  int FillInputPortInformation(int, vtkInformation*) override; //Input,Output
198 
199 private:
201  void operator=(const vtkIntersectionPolyDataFilter&) = delete;
202 
203  int NumberOfIntersectionPoints;
204  int NumberOfIntersectionLines;
205  vtkTypeBool SplitFirstOutput;
206  vtkTypeBool SplitSecondOutput;
207  vtkTypeBool ComputeIntersectionPointArray;
208  vtkTypeBool CheckMesh;
209  vtkTypeBool CheckInput;
210  int Status;
211  double Tolerance;
212  double RelativeSubtriangleArea;
213 
214  class Impl; //Implementation class
215 };
216 
217 
218 #endif // vtkIntersectionPolyDataFilter_h
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIntersectionPolyDataFilter computes the intersection between two vtkPolyData objects.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.