VTK  9.1.0
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 =========================================================================*/
49 #ifndef vtkSelectEnclosedPoints_h
50 #define vtkSelectEnclosedPoints_h
51 
52 #include "vtkDataSetAlgorithm.h"
53 #include "vtkFiltersModelingModule.h" // For export macro
54 #include "vtkIntersectionCounter.h" // to count intersections along ray
55 
59 class vtkIdList;
60 class vtkGenericCell;
61 class vtkRandomPool;
62 
63 class VTKFILTERSMODELING_EXPORT vtkSelectEnclosedPoints : public vtkDataSetAlgorithm
64 {
65 public:
67 
71  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
78 
80 
88 
90 
96 
98 
103  vtkSetMacro(InsideOut, vtkTypeBool);
104  vtkBooleanMacro(InsideOut, vtkTypeBool);
105  vtkGetMacro(InsideOut, vtkTypeBool);
107 
109 
113  vtkSetMacro(CheckSurface, vtkTypeBool);
114  vtkBooleanMacro(CheckSurface, vtkTypeBool);
115  vtkGetMacro(CheckSurface, vtkTypeBool);
117 
122  int IsInside(vtkIdType inputPtId);
123 
125 
129  vtkSetClampMacro(Tolerance, double, 0.0, VTK_FLOAT_MAX);
130  vtkGetMacro(Tolerance, double);
132 
134 
140  void Initialize(vtkPolyData* surface);
141  int IsInsideSurface(double x[3]);
142  int IsInsideSurface(double x, double y, double z);
143  void Complete();
145 
156  static int IsInsideSurface(double x[3], vtkPolyData* surface, double bds[6], double length,
157  double tol, vtkAbstractCellLocator* locator, vtkIdList* cellIds, vtkGenericCell* genCell,
158  vtkIntersectionCounter& counter, vtkRandomPool* poole = nullptr, vtkIdType seqIdx = 0);
159 
164  static int IsSurfaceClosed(vtkPolyData* surface);
165 
166 protected:
169 
172  double Tolerance;
173 
175 
176  // Internal structures for accelerating the intersection test
181  double Bounds[6];
182  double Length;
183 
186 
188 
189 private:
191  void operator=(const vtkSelectEnclosedPoints&) = delete;
192 };
193 
194 #endif
an abstract base class for locators which find cells
Proxy object to connect input/output ports.
Superclass for algorithms that produce output of the same type as input.
Detect and break reference loops.
provides thread-safe access to cells
list of point or cell ids
Definition: vtkIdList.h:31
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Fast simple class for dealing with ray intersections.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
convenience class to quickly generate a pool of random numbers
Definition: vtkRandomPool.h:49
mark points as to whether they are inside a closed surface
void Complete()
This is a backdoor that can be used to test many points for containment.
int IsInsideSurface(double x[3])
This is a backdoor that can be used to test many points for containment.
static vtkSelectEnclosedPoints * New()
Instantiate this class.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkPolyData * GetSurface(vtkInformationVector *sourceInfo)
Return a pointer to the enclosing surface.
void Initialize(vtkPolyData *surface)
This is a backdoor that can be used to test many points for containment.
static int IsInsideSurface(double x[3], vtkPolyData *surface, double bds[6], double length, double tol, vtkAbstractCellLocator *locator, vtkIdList *cellIds, vtkGenericCell *genCell, vtkIntersectionCounter &counter, vtkRandomPool *poole=nullptr, vtkIdType seqIdx=0)
A static method for determining whether a point is inside a surface.
int IsInsideSurface(double x, double y, double z)
This is a backdoor that can be used to test many points for containment.
vtkStaticCellLocator * CellLocator
vtkUnsignedCharArray * InsideOutsideArray
void SetSurfaceConnection(vtkAlgorithmOutput *algOutput)
Set the surface to be used to test for containment.
~vtkSelectEnclosedPoints() override
void SetSurfaceData(vtkPolyData *pd)
Set the surface to be used to test for containment.
void ReportReferences(vtkGarbageCollector *) override
int IsInside(vtkIdType inputPtId)
Query an input point id as to whether it is inside or outside.
vtkPolyData * GetSurface()
Return a pointer to the enclosing surface.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
static int IsSurfaceClosed(vtkPolyData *surface)
A static method for determining whether a surface is closed.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
perform fast cell location operations
dynamic, self-adjusting array of unsigned char
@ length
Definition: vtkX3D.h:399
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332
#define VTK_FLOAT_MAX
Definition: vtkType.h:163