VTK: Filters/General/vtkIntersectionPolyDataFilter.h Source File

| VTK 9.3.1

vtkIntersectionPolyDataFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
63 #ifndef vtkIntersectionPolyDataFilter_h
64 #define vtkIntersectionPolyDataFilter_h
65
66 #include "vtkFiltersGeneralModule.h" // For export macro
67 #include "vtkPolyDataAlgorithm.h"
68
69 VTK_ABI_NAMESPACE_BEGIN
70 class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
71 {
72 public:
73 static vtkIntersectionPolyDataFilter* New();
74 vtkTypeMacro(vtkIntersectionPolyDataFilter, vtkPolyDataAlgorithm);
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], double r1[3], double p2[3],
172 double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
173 double tolerance);
174
179 static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
180
184 static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
185
186 protected:
187 vtkIntersectionPolyDataFilter(); // Constructor
188 ~vtkIntersectionPolyDataFilter() override; // Destructor
189
190 int RequestData(vtkInformation*, vtkInformationVector**,
191 vtkInformationVector*) override; // Update
192 int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
193
194 private:
195 vtkIntersectionPolyDataFilter(const vtkIntersectionPolyDataFilter&) = delete;
196 void operator=(const vtkIntersectionPolyDataFilter&) = delete;
197
198 int NumberOfIntersectionPoints;
199 int NumberOfIntersectionLines;
200 vtkTypeBool SplitFirstOutput;
201 vtkTypeBool SplitSecondOutput;
202 vtkTypeBool ComputeIntersectionPointArray;
203 vtkTypeBool CheckMesh;
204 vtkTypeBool CheckInput;
205 int Status;
206 double Tolerance;
207 double RelativeSubtriangleArea;
208
209 class Impl; // Implementation class
210 };
211
212 VTK_ABI_NAMESPACE_END
213 #endif // vtkIntersectionPolyDataFilter_h
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkIntersectionPolyDataFilter
vtkIntersectionPolyDataFilter computes the intersection between two vtkPolyData objects.
Definition: vtkIntersectionPolyDataFilter.h:71
vtkIntersectionPolyDataFilter::~vtkIntersectionPolyDataFilter
~vtkIntersectionPolyDataFilter() override
vtkIntersectionPolyDataFilter::vtkIntersectionPolyDataFilter
vtkIntersectionPolyDataFilter()
vtkIntersectionPolyDataFilter::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkIntersectionPolyDataFilter::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkIntersectionPolyDataFilter::CleanAndCheckSurface
static void CleanAndCheckSurface(vtkPolyData *pd, double stats[2], double tolerance)
Function to clean and check the output surfaces for bad triangles and free edges.
vtkIntersectionPolyDataFilter::New
static vtkIntersectionPolyDataFilter * New()
vtkIntersectionPolyDataFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIntersectionPolyDataFilter::TriangleTriangleIntersection
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...
vtkIntersectionPolyDataFilter::CleanAndCheckInput
static void CleanAndCheckInput(vtkPolyData *pd, double tolerance)
Function to clean and check the inputs.
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkPolyDataAlgorithm.h