VTK  9.2.6
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=========================================================================*/
65
66#ifndef vtkIntersectionPolyDataFilter_h
67#define vtkIntersectionPolyDataFilter_h
68
69#include "vtkFiltersGeneralModule.h" // For export macro
71
72class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
73{
74public:
77 void PrintSelf(ostream& os, vtkIndent indent) override;
78
80
83 vtkGetMacro(NumberOfIntersectionPoints, int);
84 vtkGetMacro(NumberOfIntersectionLines, int);
86
88
92 vtkGetMacro(SplitFirstOutput, vtkTypeBool);
93 vtkSetMacro(SplitFirstOutput, vtkTypeBool);
94 vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
96
98
102 vtkGetMacro(SplitSecondOutput, vtkTypeBool);
103 vtkSetMacro(SplitSecondOutput, vtkTypeBool);
104 vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
106
108
112 vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
113 vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
114 vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
116
118
121 vtkGetMacro(CheckInput, vtkTypeBool);
122 vtkSetMacro(CheckInput, vtkTypeBool);
123 vtkBooleanMacro(CheckInput, vtkTypeBool);
125
127
131 vtkGetMacro(CheckMesh, vtkTypeBool);
132 vtkSetMacro(CheckMesh, vtkTypeBool);
133 vtkBooleanMacro(CheckMesh, vtkTypeBool);
135
137
142 vtkGetMacro(Status, int);
144
146
149 vtkGetMacro(Tolerance, double);
150 vtkSetMacro(Tolerance, double);
152
154
159 vtkGetMacro(RelativeSubtriangleArea, double);
160 vtkSetMacro(RelativeSubtriangleArea, double);
162
173 static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
174 double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
175 double tolerance);
176
181 static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
182
186 static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
187
188protected:
190 ~vtkIntersectionPolyDataFilter() override; // Destructor
191
193 vtkInformationVector*) override; // Update
194 int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
195
196private:
198 void operator=(const vtkIntersectionPolyDataFilter&) = delete;
199
200 int NumberOfIntersectionPoints;
201 int NumberOfIntersectionLines;
202 vtkTypeBool SplitFirstOutput;
203 vtkTypeBool SplitSecondOutput;
204 vtkTypeBool ComputeIntersectionPointArray;
205 vtkTypeBool CheckMesh;
206 vtkTypeBool CheckInput;
207 int Status;
208 double Tolerance;
209 double RelativeSubtriangleArea;
210
211 class Impl; // Implementation class
212};
213
214#endif // vtkIntersectionPolyDataFilter_h
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
~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.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
int vtkTypeBool
Definition vtkABI.h:69