VTK  9.0.2
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 =========================================================================*/
63 #ifndef vtkIntersectionPolyDataFilter_h
64 #define vtkIntersectionPolyDataFilter_h
65 
66 #include "vtkFiltersGeneralModule.h" // For export macro
67 #include "vtkPolyDataAlgorithm.h"
68 
69 class VTKFILTERSGENERAL_EXPORT vtkIntersectionPolyDataFilter : public vtkPolyDataAlgorithm
70 {
71 public:
74  void PrintSelf(ostream& os, vtkIndent indent) override;
75 
77 
80  vtkGetMacro(NumberOfIntersectionPoints, int);
81  vtkGetMacro(NumberOfIntersectionLines, int);
83 
85 
89  vtkGetMacro(SplitFirstOutput, vtkTypeBool);
90  vtkSetMacro(SplitFirstOutput, vtkTypeBool);
91  vtkBooleanMacro(SplitFirstOutput, vtkTypeBool);
93 
95 
99  vtkGetMacro(SplitSecondOutput, vtkTypeBool);
100  vtkSetMacro(SplitSecondOutput, vtkTypeBool);
101  vtkBooleanMacro(SplitSecondOutput, vtkTypeBool);
103 
105 
109  vtkGetMacro(ComputeIntersectionPointArray, vtkTypeBool);
110  vtkSetMacro(ComputeIntersectionPointArray, vtkTypeBool);
111  vtkBooleanMacro(ComputeIntersectionPointArray, vtkTypeBool);
113 
115 
118  vtkGetMacro(CheckInput, vtkTypeBool);
119  vtkSetMacro(CheckInput, vtkTypeBool);
120  vtkBooleanMacro(CheckInput, vtkTypeBool);
122 
124 
128  vtkGetMacro(CheckMesh, vtkTypeBool);
129  vtkSetMacro(CheckMesh, vtkTypeBool);
130  vtkBooleanMacro(CheckMesh, vtkTypeBool);
132 
134 
139  vtkGetMacro(Status, int);
141 
143 
146  vtkGetMacro(Tolerance, double);
147  vtkSetMacro(Tolerance, double);
149 
151 
156  vtkGetMacro(RelativeSubtriangleArea, double);
157  vtkSetMacro(RelativeSubtriangleArea, double);
159 
170  static int TriangleTriangleIntersection(double p1[3], double q1[3], double r1[3], double p2[3],
171  double q2[3], double r2[3], int& coplanar, double pt1[3], double pt2[3], double surfaceid[2],
172  double tolerance);
173 
178  static void CleanAndCheckSurface(vtkPolyData* pd, double stats[2], double tolerance);
179 
183  static void CleanAndCheckInput(vtkPolyData* pd, double tolerance);
184 
185 protected:
187  ~vtkIntersectionPolyDataFilter() override; // Destructor
188 
190  vtkInformationVector*) override; // Update
191  int FillInputPortInformation(int, vtkInformation*) override; // Input,Output
192 
193 private:
195  void operator=(const vtkIntersectionPolyDataFilter&) = delete;
196 
197  int NumberOfIntersectionPoints;
198  int NumberOfIntersectionLines;
199  vtkTypeBool SplitFirstOutput;
200  vtkTypeBool SplitSecondOutput;
201  vtkTypeBool ComputeIntersectionPointArray;
202  vtkTypeBool CheckMesh;
203  vtkTypeBool CheckInput;
204  int Status;
205  double Tolerance;
206  double RelativeSubtriangleArea;
207 
208  class Impl; // Implementation class
209 };
210 
211 #endif // vtkIntersectionPolyDataFilter_h
a simple class to control print indentation
Definition: vtkIndent.h:34
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:85
int vtkTypeBool
Definition: vtkABI.h:69