VTK  9.2.5
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 =========================================================================*/
85 #ifndef vtkIntersectionPolyDataFilter_h
86 #define vtkIntersectionPolyDataFilter_h
87 
88 #include "vtkFiltersGeneralModule.h" // For export macro
89 #include "vtkPolyDataAlgorithm.h"
90 
91 class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
92 {
93 public:
96  void PrintSelf(ostream& os, vtkIndent indent) override;
97 
99 
102  vtkGetMacro(NumberOfIntersectionPoints, int);
103  vtkGetMacro(NumberOfIntersectionLines, int);
105 
107 
111  vtkGetMacro(SplitFirstOutput, vtkTypeBool);
112  vtkSetMacro(SplitFirstOutput, vtkTypeBool);
113  vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
115 
117 
121  vtkGetMacro(SplitSecondOutput, vtkTypeBool);
122  vtkSetMacro(SplitSecondOutput, vtkTypeBool);
123  vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
125 
127 
131  vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
132  vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
133  vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
135 
137 
140  vtkGetMacro(CheckInput, vtkTypeBool);
141  vtkSetMacro(CheckInput, vtkTypeBool);
142  vtkBooleanMacro(CheckInput, vtkTypeBool);
144 
146 
150  vtkGetMacro(CheckMesh, vtkTypeBool);
151  vtkSetMacro(CheckMesh, vtkTypeBool);
152  vtkBooleanMacro(CheckMesh, vtkTypeBool);
154 
156 
161  vtkGetMacro(Status, int);
163 
165 
168  vtkGetMacro(Tolerance, double);
169  vtkSetMacro(Tolerance, double);
171 
173 
178  vtkGetMacro(RelativeSubtriangleArea, double);
179  vtkSetMacro(RelativeSubtriangleArea, double);
181 
192  static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
193  double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
194  double tolerance);
195 
200  static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
201 
205  static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
206 
207 protected:
209  ~vtkIntersectionPolyDataFilter() override; // Destructor
210 
212  vtkInformationVector*) override; // Update
213  int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
214 
215 private:
217  void operator=(const vtkIntersectionPolyDataFilter&) = delete;
218 
219  int NumberOfIntersectionPoints;
220  int NumberOfIntersectionLines;
221  vtkTypeBool SplitFirstOutput;
222  vtkTypeBool SplitSecondOutput;
223  vtkTypeBool ComputeIntersectionPointArray;
224  vtkTypeBool CheckMesh;
225  vtkTypeBool CheckInput;
226  int Status;
227  double Tolerance;
228  double RelativeSubtriangleArea;
229 
230  class Impl; // Implementation class
231 };
232 
233 #endif // vtkIntersectionPolyDataFilter_h
a simple class to control print indentation
Definition: vtkIndent.h:119
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:200
int vtkTypeBool
Definition: vtkABI.h:69