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 =========================================================================*/
45 #ifndef vtkSelectEnclosedPoints_h
46 #define vtkSelectEnclosedPoints_h
47 
48 #include "vtkFiltersModelingModule.h" // For export macro
49 #include "vtkDataSetAlgorithm.h"
50 
52 class vtkCellLocator;
53 class vtkIdList;
54 class vtkGenericCell;
55 
56 
58 {
59 public:
61 
63  void PrintSelf(ostream& os, vtkIndent indent);
65 
67  static vtkSelectEnclosedPoints *New();
68 
70 
73  void SetSurfaceData(vtkPolyData *pd);
74  void SetSurfaceConnection(vtkAlgorithmOutput* algOutput);
76 
78 
79  vtkPolyData *GetSurface();
80  vtkPolyData *GetSurface(vtkInformationVector *sourceInfo);
82 
84 
87  vtkSetMacro(InsideOut,int);
88  vtkBooleanMacro(InsideOut,int);
89  vtkGetMacro(InsideOut,int);
91 
93 
95  vtkSetMacro(CheckSurface,int);
96  vtkBooleanMacro(CheckSurface,int);
97  vtkGetMacro(CheckSurface,int);
99 
102  int IsInside(vtkIdType inputPtId);
103 
105 
107  vtkSetClampMacro(Tolerance,double,0.0,VTK_FLOAT_MAX);
108  vtkGetMacro(Tolerance,double);
110 
112 
116  void Initialize(vtkPolyData *surface);
117  int IsInsideSurface(double x, double y, double z);
118  int IsInsideSurface(double x[3]);
119  void Complete();
121 
122 protected:
125 
128  double Tolerance;
129 
130  int IsSurfaceClosed(vtkPolyData *surface);
132 
133  // Internal structures for accelerating the intersection test
138  double Bounds[6];
139  double Length;
140 
142  virtual int FillInputPortInformation(int, vtkInformation *);
143 
144  virtual void ReportReferences(vtkGarbageCollector*);
145 
146 private:
147  vtkSelectEnclosedPoints(const vtkSelectEnclosedPoints&); // Not implemented.
148  void operator=(const vtkSelectEnclosedPoints&); // Not implemented.
149 };
150 
151 #endif
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkUnsignedCharArray * InsideOutsideArray
Store vtkAlgorithm input/output information.
#define VTKFILTERSMODELING_EXPORT
mark points as to whether they are inside a closed surface
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
Detect and break reference loops.
provides thread-safe access to cells
Proxy object to connect input/output ports.
virtual void ReportReferences(vtkGarbageCollector *)
octree-based spatial search object to quickly locate cells
#define VTK_FLOAT_MAX
Definition: vtkType.h:140
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
dynamic, self-adjusting array of unsigned char
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce output of the same type as input.
static vtkDataSetAlgorithm * New()