VTK  9.1.0
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=========================================================================*/
82#ifndef vtkIntersectionPolyDataFilter_h
83#define vtkIntersectionPolyDataFilter_h
84
85#include "vtkFiltersGeneralModule.h" // For export macro
87
88class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
89{
90public:
93 void PrintSelf(ostream& os, vtkIndent indent) override;
94
96
99 vtkGetMacro(NumberOfIntersectionPoints, int);
100 vtkGetMacro(NumberOfIntersectionLines, int);
102
104
108 vtkGetMacro(SplitFirstOutput, vtkTypeBool);
109 vtkSetMacro(SplitFirstOutput, vtkTypeBool);
110 vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
112
114
118 vtkGetMacro(SplitSecondOutput, vtkTypeBool);
119 vtkSetMacro(SplitSecondOutput, vtkTypeBool);
120 vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
122
124
128 vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
129 vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
130 vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
132
134
137 vtkGetMacro(CheckInput, vtkTypeBool);
138 vtkSetMacro(CheckInput, vtkTypeBool);
139 vtkBooleanMacro(CheckInput, vtkTypeBool);
141
143
147 vtkGetMacro(CheckMesh, vtkTypeBool);
148 vtkSetMacro(CheckMesh, vtkTypeBool);
149 vtkBooleanMacro(CheckMesh, vtkTypeBool);
151
153
158 vtkGetMacro(Status, int);
160
162
165 vtkGetMacro(Tolerance, double);
166 vtkSetMacro(Tolerance, double);
168
170
175 vtkGetMacro(RelativeSubtriangleArea, double);
176 vtkSetMacro(RelativeSubtriangleArea, double);
178
189 static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
190 double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
191 double tolerance);
192
197 static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
198
202 static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
203
204protected:
206 ~vtkIntersectionPolyDataFilter() override; // Destructor
207
209 vtkInformationVector*) override; // Update
210 int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
211
212private:
214 void operator=(const vtkIntersectionPolyDataFilter&) = delete;
215
216 int NumberOfIntersectionPoints;
217 int NumberOfIntersectionLines;
218 vtkTypeBool SplitFirstOutput;
219 vtkTypeBool SplitSecondOutput;
220 vtkTypeBool ComputeIntersectionPointArray;
221 vtkTypeBool CheckMesh;
222 vtkTypeBool CheckInput;
223 int Status;
224 double Tolerance;
225 double RelativeSubtriangleArea;
226
227 class Impl; // Implementation class
228};
229
230#endif // vtkIntersectionPolyDataFilter_h
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
vtkIntersectionPolyDataFilter computes the intersection between two vtkPolyData objects.
~vtkIntersectionPolyDataFilter() override
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static void CleanAndCheckSurface(vtkPolyData *pd, double stats[2], double tolerance)
Function to clean and check the output surfaces for bad triangles and free edges.
static vtkIntersectionPolyDataFilter * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3], double q2[3], double r2[3], int &coplanar, double pt1[3], double pt2[3], double surfaceid[2], double tolerance)
Given two triangles defined by points (p1, q1, r1) and (p2, q2, r2), returns whether the two triangle...
static void CleanAndCheckInput(vtkPolyData *pd, double tolerance)
Function to clean and check the inputs.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
int vtkTypeBool
Definition: vtkABI.h:69