VTK
vtkSelectEnclosedPoints.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSelectEnclosedPoints.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 =========================================================================*/
43 #ifndef vtkSelectEnclosedPoints_h
44 #define vtkSelectEnclosedPoints_h
45 
46 #include "vtkFiltersModelingModule.h" // For export macro
47 #include "vtkDataSetAlgorithm.h"
48 
50 class vtkCellLocator;
51 class vtkIdList;
52 class vtkGenericCell;
53 
54 
55 class VTKFILTERSMODELING_EXPORT vtkSelectEnclosedPoints : public vtkDataSetAlgorithm
56 {
57 public:
59 
63  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
65 
69  static vtkSelectEnclosedPoints *New();
70 
72 
77  void SetSurfaceData(vtkPolyData *pd);
78  void SetSurfaceConnection(vtkAlgorithmOutput* algOutput);
80 
82 
85  vtkPolyData *GetSurface();
86  vtkPolyData *GetSurface(vtkInformationVector *sourceInfo);
88 
90 
95  vtkSetMacro(InsideOut,int);
96  vtkBooleanMacro(InsideOut,int);
97  vtkGetMacro(InsideOut,int);
99 
101 
105  vtkSetMacro(CheckSurface,int);
106  vtkBooleanMacro(CheckSurface,int);
107  vtkGetMacro(CheckSurface,int);
109 
114  int IsInside(vtkIdType inputPtId);
115 
117 
121  vtkSetClampMacro(Tolerance,double,0.0,VTK_FLOAT_MAX);
122  vtkGetMacro(Tolerance,double);
124 
126 
132  void Initialize(vtkPolyData *surface);
133  int IsInsideSurface(double x, double y, double z);
134  int IsInsideSurface(double x[3]);
135  void Complete();
137 
138 protected:
140  ~vtkSelectEnclosedPoints() VTK_OVERRIDE;
141 
142  int CheckSurface;
143  int InsideOut;
144  double Tolerance;
145 
146  int IsSurfaceClosed(vtkPolyData *surface);
147  vtkUnsignedCharArray *InsideOutsideArray;
148 
149  // Internal structures for accelerating the intersection test
150  vtkCellLocator *CellLocator;
151  vtkIdList *CellIds;
153  vtkPolyData *Surface;
154  double Bounds[6];
155  double Length;
156 
157  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
158  int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
159 
160  void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
161 
162 private:
163  vtkSelectEnclosedPoints(const vtkSelectEnclosedPoints&) VTK_DELETE_FUNCTION;
164  void operator=(const vtkSelectEnclosedPoints&) VTK_DELETE_FUNCTION;
165 };
166 
167 #endif
Store vtkAlgorithm input/output information.
mark points as to whether they are inside a closed surface
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
Detect and break reference loops.
provides thread-safe access to cells
Proxy object to connect input/output ports.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
octree-based spatial search object to quickly locate cells
#define VTK_FLOAT_MAX
Definition: vtkType.h:165
a simple class to control print indentation
Definition: vtkIndent.h:33
list of point or cell ids
Definition: vtkIdList.h:30
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkDataSetAlgorithm * New()