dox/Common/vtkPointLocator2D.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00045
#ifndef __vtkPointLocator2D_h
00046
#define __vtkPointLocator2D_h
00047
00048
#include "vtkLocator.h"
00049
00050
class vtkCellArray;
00051
class vtkIdList;
00052
class vtkNeighborPoints2D;
00053
class vtkPoints;
00054
00055 class VTK_COMMON_EXPORT vtkPointLocator2D :
public vtkLocator
00056 {
00057
public:
00060
static vtkPointLocator2D *
New();
00061
00062 vtkTypeRevisionMacro(vtkPointLocator2D,
vtkLocator);
00063
void PrintSelf(ostream& os,
vtkIndent indent);
00064
00066
00067 vtkSetVector2Macro(Divisions,
int);
00068 vtkGetVectorMacro(Divisions,
int,2);
00070
00072
00073 vtkSetClampMacro(NumberOfPointsPerBucket,
int,1,VTK_LARGE_INTEGER);
00074 vtkGetMacro(NumberOfPointsPerBucket,
int);
00076
00078
virtual int FindClosestPoint(
float x[2]);
00079
00083
virtual int IsInsertedPoint(
float x[2]);
00084
00086
00090
virtual void FindClosestNPoints(
int N,
float x[2],
vtkIdList *result);
00091
virtual void FindClosestNPoints(
int N,
float x,
float y,
00092
vtkIdList *result);
00094
00096
00099
virtual void FindDistributedPoints(
int N,
float x[2],
00100
vtkIdList *result,
int M);
00101
virtual void FindDistributedPoints(
int N,
float x,
float y,
00102
vtkIdList *result,
int M);
00104
00106
00108
virtual void FindPointsWithinRadius(
float R,
float x[2],
vtkIdList *result);
00109
virtual void FindPointsWithinRadius(
float R,
float x,
float y,
00110
vtkIdList *result);
00111
00112
00113
void Initialize();
00114
void FreeSearchStructure();
00115
void BuildLocator();
00116
void GenerateRepresentation(
int level,
vtkPolyData *pd);
00118
00120
00121
virtual void SetPoints(
vtkPoints*);
00122 vtkGetObjectMacro(Points,
vtkPoints);
00124
00125
protected:
00126 vtkPointLocator2D();
00127 ~vtkPointLocator2D();
00128
00129
00130
void GetBucketNeighbors(
int ijk[2],
int ndivs[2],
int level);
00131
void GetOverlappingBuckets(
float x[2],
int ijk[2],
float dist,
int level);
00132
void GenerateFace(
int face,
int i,
int j,
int k,
00133
vtkPoints *pts,
vtkCellArray *polys);
00134
00135 vtkPoints *Points;
00136 int Divisions[2];
00137 int NumberOfPointsPerBucket;
00138 float Bounds[4];
00139 vtkIdList **HashTable;
00140 int NumberOfBuckets;
00141 float H[2];
00142 vtkNeighborPoints2D *Buckets;
00143 float InsertionTol2;
00144
private:
00145 vtkPointLocator2D(
const vtkPointLocator2D&);
00146
void operator=(
const vtkPointLocator2D&);
00147 };
00148
00149
#endif
00150
00151