VTK  9.3.0
vtkSelectEnclosedPoints.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
40#ifndef vtkSelectEnclosedPoints_h
41#define vtkSelectEnclosedPoints_h
42
43#include "vtkDataSetAlgorithm.h"
44#include "vtkFiltersModelingModule.h" // For export macro
45#include "vtkIntersectionCounter.h" // to count intersections along ray
46
47VTK_ABI_NAMESPACE_BEGIN
51class vtkIdList;
52class vtkGenericCell;
53class vtkRandomPool;
54
55class VTKFILTERSMODELING_EXPORT vtkSelectEnclosedPoints : public vtkDataSetAlgorithm
56{
57public:
59
63 void PrintSelf(ostream& os, vtkIndent indent) override;
65
70
72
80
82
88
90
95 vtkSetMacro(InsideOut, vtkTypeBool);
96 vtkBooleanMacro(InsideOut, vtkTypeBool);
97 vtkGetMacro(InsideOut, vtkTypeBool);
99
101
105 vtkSetMacro(CheckSurface, vtkTypeBool);
106 vtkBooleanMacro(CheckSurface, vtkTypeBool);
107 vtkGetMacro(CheckSurface, vtkTypeBool);
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[3]);
134 int IsInsideSurface(double x, double y, double z);
135 void Complete();
137
148 static int IsInsideSurface(double x[3], vtkPolyData* surface, double bds[6], double length,
149 double tol, vtkAbstractCellLocator* locator, vtkIdList* cellIds, vtkGenericCell* genCell,
150 vtkIntersectionCounter& counter, vtkRandomPool* poole = nullptr, vtkIdType seqIdx = 0);
151
156 static int IsSurfaceClosed(vtkPolyData* surface);
157
158protected:
161
164 double Tolerance;
165
167
168 // Internal structures for accelerating the intersection test
173 double Bounds[6];
174 double Length;
175
178
180
181private:
183 void operator=(const vtkSelectEnclosedPoints&) = delete;
184};
185
186VTK_ABI_NAMESPACE_END
187#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:23
a simple class to control print indentation
Definition vtkIndent.h:29
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:80
convenience class to quickly generate a pool of random numbers
mark points as to whether they are inside a closed surface
vtkPolyData * GetSurface()
Return a pointer to the enclosing surface.
vtkPolyData * GetSurface(vtkInformationVector *sourceInfo)
Return a pointer to the enclosing 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.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
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
static vtkSelectEnclosedPoints * New()
Instantiate this class.
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.
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
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:315
#define VTK_FLOAT_MAX
Definition vtkType.h:152