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=========================================================================*/
75#ifndef vtkIntersectionPolyDataFilter_h
76#define vtkIntersectionPolyDataFilter_h
77
78#include "vtkFiltersGeneralModule.h" // For export macro
80
81class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
82{
83public:
86 void PrintSelf(ostream& os, vtkIndent indent) override;
87
89
92 vtkGetMacro(NumberOfIntersectionPoints, int);
93 vtkGetMacro(NumberOfIntersectionLines, int);
95
97
101 vtkGetMacro(SplitFirstOutput, vtkTypeBool);
102 vtkSetMacro(SplitFirstOutput, vtkTypeBool);
103 vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
105
107
111 vtkGetMacro(SplitSecondOutput, vtkTypeBool);
112 vtkSetMacro(SplitSecondOutput, vtkTypeBool);
113 vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
115
117
121 vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
122 vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
123 vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
125
127
130 vtkGetMacro(CheckInput, vtkTypeBool);
131 vtkSetMacro(CheckInput, vtkTypeBool);
132 vtkBooleanMacro(CheckInput, vtkTypeBool);
134
136
140 vtkGetMacro(CheckMesh, vtkTypeBool);
141 vtkSetMacro(CheckMesh, vtkTypeBool);
142 vtkBooleanMacro(CheckMesh, vtkTypeBool);
144
146
151 vtkGetMacro(Status, int);
153
155
158 vtkGetMacro(Tolerance, double);
159 vtkSetMacro(Tolerance, double);
161
163
168 vtkGetMacro(RelativeSubtriangleArea, double);
169 vtkSetMacro(RelativeSubtriangleArea, double);
171
182 static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
183 double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
184 double tolerance);
185
190 static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
191
195 static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
196
197protected:
199 ~vtkIntersectionPolyDataFilter() override; // Destructor
200
202 vtkInformationVector*) override; // Update
203 int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
204
205private:
207 void operator=(const vtkIntersectionPolyDataFilter&) = delete;
208
209 int NumberOfIntersectionPoints;
210 int NumberOfIntersectionLines;
211 vtkTypeBool SplitFirstOutput;
212 vtkTypeBool SplitSecondOutput;
213 vtkTypeBool ComputeIntersectionPointArray;
214 vtkTypeBool CheckMesh;
215 vtkTypeBool CheckInput;
216 int Status;
217 double Tolerance;
218 double RelativeSubtriangleArea;
219
220 class Impl; // Implementation class
221};
222
223#endif // vtkIntersectionPolyDataFilter_h
a simple class to control print indentation
Definition vtkIndent.h:49
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
int vtkTypeBool
Definition vtkABI.h:69