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 =========================================================================*/
46 #ifndef vtkSelectEnclosedPoints_h
47 #define vtkSelectEnclosedPoints_h
48 
49 #include "vtkFiltersModelingModule.h" // For export macro
50 #include "vtkDataSetAlgorithm.h"
51 
53 class vtkCellLocator;
54 class vtkIdList;
55 class vtkGenericCell;
56 
57 
58 class VTKFILTERSMODELING_EXPORT vtkSelectEnclosedPoints : public vtkDataSetAlgorithm
59 {
60 public:
62 
66  void PrintSelf(ostream& os, vtkIndent indent);
68 
73 
75 
83 
85 
91 
93 
98  vtkSetMacro(InsideOut,int);
99  vtkBooleanMacro(InsideOut,int);
100  vtkGetMacro(InsideOut,int);
102 
104 
108  vtkSetMacro(CheckSurface,int);
109  vtkBooleanMacro(CheckSurface,int);
110  vtkGetMacro(CheckSurface,int);
112 
117  int IsInside(vtkIdType inputPtId);
118 
120 
124  vtkSetClampMacro(Tolerance,double,0.0,VTK_FLOAT_MAX);
125  vtkGetMacro(Tolerance,double);
127 
129 
135  void Initialize(vtkPolyData *surface);
136  int IsInsideSurface(double x, double y, double z);
137  int IsInsideSurface(double x[3]);
138  void Complete();
140 
141 protected:
144 
147  double Tolerance;
148 
151 
152  // Internal structures for accelerating the intersection test
157  double Bounds[6];
158  double Length;
159 
162 
164 
165 private:
166  vtkSelectEnclosedPoints(const vtkSelectEnclosedPoints&) VTK_DELETE_FUNCTION;
167  void operator=(const vtkSelectEnclosedPoints&) VTK_DELETE_FUNCTION;
168 };
169 
170 #endif
vtkSelectEnclosedPoints::IsSurfaceClosed
int IsSurfaceClosed(vtkPolyData *surface)
vtkSelectEnclosedPoints::CheckSurface
int CheckSurface
Definition: vtkSelectEnclosedPoints.h:145
vtkSelectEnclosedPoints::FillInputPortInformation
virtual int FillInputPortInformation(int, vtkInformation *)
Fill the input port information objects for this algorithm.
vtkSelectEnclosedPoints::InsideOut
int InsideOut
Definition: vtkSelectEnclosedPoints.h:146
vtkCellLocator
octree-based spatial search object to quickly locate cells
Definition: vtkCellLocator.h:53
vtkSelectEnclosedPoints::New
static vtkSelectEnclosedPoints * New()
Instantiate this class.
vtkSelectEnclosedPoints::IsInsideSurface
int IsInsideSurface(double x[3])
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkSelectEnclosedPoints::Complete
void Complete()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:42
vtkSelectEnclosedPoints::Tolerance
double Tolerance
Definition: vtkSelectEnclosedPoints.h:147
vtkSelectEnclosedPoints::IsInsideSurface
int IsInsideSurface(double x, double y, double z)
vtkSelectEnclosedPoints::InsideOutsideArray
vtkUnsignedCharArray * InsideOutsideArray
Definition: vtkSelectEnclosedPoints.h:150
vtkSelectEnclosedPoints::~vtkSelectEnclosedPoints
~vtkSelectEnclosedPoints()
vtkDataSetAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkDataSetAlgorithm.h:52
vtkSelectEnclosedPoints::Cell
vtkGenericCell * Cell
Definition: vtkSelectEnclosedPoints.h:155
vtkSelectEnclosedPoints::Surface
vtkPolyData * Surface
Definition: vtkSelectEnclosedPoints.h:156
vtkSelectEnclosedPoints::Initialize
void Initialize(vtkPolyData *surface)
This is a backdoor that can be used to test many points for containment.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkSelectEnclosedPoints::Length
double Length
Definition: vtkSelectEnclosedPoints.h:158
vtkSelectEnclosedPoints::GetSurface
vtkPolyData * GetSurface(vtkInformationVector *sourceInfo)
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:161
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:100
vtkSelectEnclosedPoints::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkSelectEnclosedPoints::SetSurfaceData
void SetSurfaceData(vtkPolyData *pd)
Set the surface to be used to test for containment.
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.
vtkSelectEnclosedPoints::ReportReferences
void ReportReferences(vtkGarbageCollector *) override
vtkDataSetAlgorithm.h
vtkSelectEnclosedPoints::vtkSelectEnclosedPoints
vtkSelectEnclosedPoints()
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:40
vtkSelectEnclosedPoints::GetSurface
vtkPolyData * GetSurface()
Return a pointer to the enclosing surface.
vtkSelectEnclosedPoints
mark points as to whether they are inside a closed surface
Definition: vtkSelectEnclosedPoints.h:59
vtkSelectEnclosedPoints::CellIds
vtkIdList * CellIds
Definition: vtkSelectEnclosedPoints.h:154
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:40
vtkSelectEnclosedPoints::CellLocator
vtkCellLocator * CellLocator
Definition: vtkSelectEnclosedPoints.h:153
vtkSelectEnclosedPoints::SetSurfaceConnection
void SetSurfaceConnection(vtkAlgorithmOutput *algOutput)
vtkSelectEnclosedPoints::IsInside
int IsInside(vtkIdType inputPtId)
Query an input point id as to whether it is inside or outside.
vtkSelectEnclosedPoints::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.