VTK
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 :
71 {
72 public:
75  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
76 
78 
81  vtkGetMacro(NumberOfIntersectionPoints, int);
82  vtkGetMacro(NumberOfIntersectionLines, int);
84 
86 
90  vtkGetMacro(SplitFirstOutput, int);
91  vtkSetMacro(SplitFirstOutput, int);
92  vtkBooleanMacro(SplitFirstOutput, int);
94 
96 
100  vtkGetMacro(SplitSecondOutput, int);
101  vtkSetMacro(SplitSecondOutput, int);
102  vtkBooleanMacro(SplitSecondOutput, int);
104 
106 
110  vtkGetMacro(ComputeIntersectionPointArray, int);
111  vtkSetMacro(ComputeIntersectionPointArray, int);
112  vtkBooleanMacro(ComputeIntersectionPointArray, int);
114 
116 
119  vtkGetMacro(CheckInput, int);
120  vtkSetMacro(CheckInput, int);
121  vtkBooleanMacro(CheckInput, int);
123 
125 
129  vtkGetMacro(CheckMesh, int);
130  vtkSetMacro(CheckMesh, int);
131  vtkBooleanMacro(CheckMesh, int);
133 
135 
140  vtkGetMacro(Status, int);
142 
144 
147  vtkGetMacro(Tolerance, double);
148  vtkSetMacro(Tolerance, double);
150 
161  static int TriangleTriangleIntersection(double p1[3], double q1[3],
162  double r1[3], double p2[3],
163  double q2[3], double r2[3],
164  int &coplanar, double pt1[3],
165  double pt2[3], double surfaceid[2],
166  double tolerance);
167 
172  static void CleanAndCheckSurface(vtkPolyData *pd, double stats[2],
173  double tolerance);
174 
178  static void CleanAndCheckInput(vtkPolyData *pd, double tolerance);
179 
180 
181 protected:
183  ~vtkIntersectionPolyDataFilter() VTK_OVERRIDE; //Destructor
184 
186  vtkInformationVector*) VTK_OVERRIDE; //Update
187  int FillInputPortInformation(int, vtkInformation*) VTK_OVERRIDE; //Input,Output
188 
189 private:
191  void operator=(const vtkIntersectionPolyDataFilter&) VTK_DELETE_FUNCTION;
192 
193  int NumberOfIntersectionPoints;
194  int NumberOfIntersectionLines;
195  int SplitFirstOutput;
196  int SplitSecondOutput;
197  int ComputeIntersectionPointArray;
198  int CheckMesh;
199  int CheckInput;
200  int Status;
201  double Tolerance;
202 
203  class Impl; //Implementation class
204 };
205 
206 
207 #endif // vtkIntersectionPolyDataFilter_h
vtkIntersectionPolyDataFilter::CleanAndCheckInput
static void CleanAndCheckInput(vtkPolyData *pd, double tolerance)
Function to clean and check the inputs.
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...
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkIntersectionPolyDataFilter::New
static vtkIntersectionPolyDataFilter * New()
vtkIntersectionPolyDataFilter::vtkIntersectionPolyDataFilter
vtkIntersectionPolyDataFilter()
vtkIntersectionPolyDataFilter
vtkIntersectionPolyDataFilter computes the intersection between two vtkPolyData objects.
Definition: vtkIntersectionPolyDataFilter.h:71
vtkPolyDataAlgorithm.h
vtkIntersectionPolyDataFilter::~vtkIntersectionPolyDataFilter
~vtkIntersectionPolyDataFilter() override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkIntersectionPolyDataFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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.
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45