00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00045 #ifndef __vtkSelectEnclosedPoints_h
00046 #define __vtkSelectEnclosedPoints_h
00047
00048 #include "vtkDataSetAlgorithm.h"
00049
00050 class vtkUnsignedCharArray;
00051 class vtkCellLocator;
00052 class vtkIdList;
00053 class vtkGenericCell;
00054
00055
00056 class VTK_GRAPHICS_EXPORT vtkSelectEnclosedPoints : public vtkDataSetAlgorithm
00057 {
00058 public:
00060
00061 vtkTypeRevisionMacro(vtkSelectEnclosedPoints,vtkDataSetAlgorithm);
00062 void PrintSelf(ostream& os, vtkIndent indent);
00064
00066 static vtkSelectEnclosedPoints *New();
00067
00069
00072 void SetSurface(vtkPolyData *pd);
00073 void SetSurfaceConnection(vtkAlgorithmOutput* algOutput);
00075
00077
00078 vtkPolyData *GetSurface();
00079 vtkPolyData *GetSurface(vtkInformationVector *sourceInfo);
00081
00083
00086 vtkSetMacro(InsideOut,int);
00087 vtkBooleanMacro(InsideOut,int);
00088 vtkGetMacro(InsideOut,int);
00090
00092
00094 vtkSetMacro(CheckSurface,int);
00095 vtkBooleanMacro(CheckSurface,int);
00096 vtkGetMacro(CheckSurface,int);
00098
00101 int IsInside(vtkIdType inputPtId);
00102
00104
00106 vtkSetClampMacro(Tolerance,double,0.0,VTK_LARGE_FLOAT);
00107 vtkGetMacro(Tolerance,double);
00109
00111
00115 void Initialize(vtkPolyData *surface);
00116 int IsInsideSurface(double x, double y, double z);
00117 int IsInsideSurface(double x[3]);
00118 void Complete();
00120
00121 protected:
00122 vtkSelectEnclosedPoints();
00123 ~vtkSelectEnclosedPoints();
00124
00125 int CheckSurface;
00126 int InsideOut;
00127 double Tolerance;
00128
00129 int IsSurfaceClosed(vtkPolyData *surface);
00130 vtkUnsignedCharArray *InsideOutsideArray;
00131
00132
00133 vtkCellLocator *CellLocator;
00134 vtkIdList *CellIds;
00135 vtkGenericCell *Cell;
00136 vtkPolyData *Surface;
00137 double Bounds[6];
00138 double Length;
00139
00140 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00141 virtual int FillInputPortInformation(int, vtkInformation *);
00142
00143 virtual void ReportReferences(vtkGarbageCollector*);
00144
00145 private:
00146 vtkSelectEnclosedPoints(const vtkSelectEnclosedPoints&);
00147 void operator=(const vtkSelectEnclosedPoints&);
00148 };
00149
00150 #endif