VTK  9.2.6
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 =========================================================================*/
52 #ifndef vtkSelectEnclosedPoints_h
53 #define vtkSelectEnclosedPoints_h
54 
55 #include "vtkDataSetAlgorithm.h"
56 #include "vtkFiltersModelingModule.h" // For export macro
57 #include "vtkIntersectionCounter.h" // to count intersections along ray
58 
62 class vtkIdList;
63 class vtkGenericCell;
64 class vtkRandomPool;
65 
66 class VTKFILTERSMODELING_EXPORT vtkSelectEnclosedPoints : public vtkDataSetAlgorithm
67 {
68 public:
70 
74  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
80  static vtkSelectEnclosedPoints* New();
81 
83 
88  void SetSurfaceData(vtkPolyData* pd);
89  void SetSurfaceConnection(vtkAlgorithmOutput* algOutput);
91 
93 
96  vtkPolyData* GetSurface();
97  vtkPolyData* GetSurface(vtkInformationVector* sourceInfo);
99 
101 
106  vtkSetMacro(InsideOut, vtkTypeBool);
107  vtkBooleanMacro(InsideOut, vtkTypeBool);
108  vtkGetMacro(InsideOut, vtkTypeBool);
110 
112 
116  vtkSetMacro(CheckSurface, vtkTypeBool);
117  vtkBooleanMacro(CheckSurface, vtkTypeBool);
118  vtkGetMacro(CheckSurface, vtkTypeBool);
120 
125  int IsInside(vtkIdType inputPtId);
126 
128 
132  vtkSetClampMacro(Tolerance, double, 0.0, VTK_FLOAT_MAX);
133  vtkGetMacro(Tolerance, double);
135 
137 
143  void Initialize(vtkPolyData* surface);
144  int IsInsideSurface(double x[3]);
145  int IsInsideSurface(double x, double y, double z);
146  void Complete();
148 
159  static int IsInsideSurface(double x[3], vtkPolyData* surface, double bds[6], double length,
160  double tol, vtkAbstractCellLocator* locator, vtkIdList* cellIds, vtkGenericCell* genCell,
161  vtkIntersectionCounter& counter, vtkRandomPool* poole = nullptr, vtkIdType seqIdx = 0);
162 
167  static int IsSurfaceClosed(vtkPolyData* surface);
168 
169 protected:
171  ~vtkSelectEnclosedPoints() override;
172 
175  double Tolerance;
176 
178 
179  // Internal structures for accelerating the intersection test
184  double Bounds[6];
185  double Length;
186 
188  int FillInputPortInformation(int, vtkInformation*) override;
189 
190  void ReportReferences(vtkGarbageCollector*) override;
191 
192 private:
194  void operator=(const vtkSelectEnclosedPoints&) = delete;
195 };
196 
197 #endif
vtkUnsignedCharArray * InsideOutsideArray
Store vtkAlgorithm input/output information.
void ReportReferences(vtkGarbageCollector *) override
convenience class to quickly generate a pool of random numbers
Definition: vtkRandomPool.h:51
an abstract base class for locators which find cells
mark points as to whether they are inside a closed surface
perform fast cell location operations
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
Detect and break reference loops.
provides thread-safe access to cells
Proxy object to connect input/output ports.
int vtkTypeBool
Definition: vtkABI.h:69
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkStaticCellLocator * CellLocator
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
Fast simple class for dealing with ray intersections.
a simple class to control print indentation
Definition: vtkIndent.h:39
list of point or cell ids
Definition: vtkIdList.h:33
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
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.
static vtkDataSetAlgorithm * New()
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.