Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkPointLocator2D Class Reference

quickly locate points in 2-space. More...

#include <vtkPointLocator2D.h>

Inheritance diagram for vtkPointLocator2D:

Inheritance graph
[legend]
Collaboration diagram for vtkPointLocator2D:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetDivisions (int, int)
void SetDivisions (int[2])
virtual int * GetDivisions ()
virtual void GetDivisions (int data[2])
virtual void SetNumberOfPointsPerBucket (int)
virtual int GetNumberOfPointsPerBucket ()
virtual int FindClosestPoint (float x[2])
virtual int IsInsertedPoint (float x[2])
virtual void FindClosestNPoints (int N, float x[2], vtkIdList *result)
virtual void FindClosestNPoints (int N, float x, float y, vtkIdList *result)
virtual void FindDistributedPoints (int N, float x[2], vtkIdList *result, int M)
virtual void FindDistributedPoints (int N, float x, float y, vtkIdList *result, int M)
virtual void FindPointsWithinRadius (float R, float x[2], vtkIdList *result)
virtual void FindPointsWithinRadius (float R, float x, float y, vtkIdList *result)
void Initialize ()
void FreeSearchStructure ()
void BuildLocator ()
void GenerateRepresentation (int level, vtkPolyData *pd)
virtual void SetPoints (vtkPoints *)
virtual vtkPointsGetPoints ()

Static Public Methods

vtkPointLocator2D * New ()
int IsTypeOf (const char *type)
vtkPointLocator2D * SafeDownCast (vtkObject *o)

Protected Methods

 vtkPointLocator2D ()
 ~vtkPointLocator2D ()
 vtkPointLocator2D (const vtkPointLocator2D &)
void operator= (const vtkPointLocator2D &)
void GetBucketNeighbors (int ijk[2], int ndivs[2], int level)
void GetOverlappingBuckets (float x[2], int ijk[2], float dist, int level)
void GenerateFace (int face, int i, int j, int k, vtkPoints *pts, vtkCellArray *polys)

Protected Attributes

vtkPointsPoints
int Divisions [2]
int NumberOfPointsPerBucket
float Bounds [4]
vtkIdList ** HashTable
int NumberOfBuckets
float H [2]
vtkNeighborPoints * Buckets
float InsertionTol2

Detailed Description

quickly locate points in 2-space.

Date:
2000/12/10 20:08:14
Revision:
1.12

vtkPointLocator2D is a spatial search object to quickly locate points in 2D. vtkPointLocator2D works by dividing a specified region of space into a regular array of "rectangular" buckets, and then keeping a list of points that lie in each bucket. Typical operation involves giving a position in 2D and finding the closest point.

vtkPointLocator2D has two distinct methods of interaction. In the first method, you supply it with a dataset, and it operates on the points in the dataset. In the second method, you supply it with an array of points, and the object operates on the array.

This class is similar to vtkPointLocator except that it assumes the points are located in 2D (or at least that the z-coordinate is ignored).

Warning:
Many other types of spatial locators have been developed such as octrees and kd-trees. These are often more efficient for the operations described here.
See also:
vtkPointLocator vtkCellPicker vtkPointPicker
Examples:
vtkPointLocator2D (examples)

Definition at line 80 of file vtkPointLocator2D.h.


Constructor & Destructor Documentation

vtkPointLocator2D::vtkPointLocator2D   [protected]
 

vtkPointLocator2D::~vtkPointLocator2D   [protected]
 

vtkPointLocator2D::vtkPointLocator2D const vtkPointLocator2D &    [inline, protected]
 

Definition at line 140 of file vtkPointLocator2D.h.


Member Function Documentation

vtkPointLocator2D* vtkPointLocator2D::New   [static]
 

Construct with automatic computation of divisions, averaging 25 points per bucket.

Reimplemented from vtkObject.

Reimplemented in vtkMergePoints2D.

virtual const char* vtkPointLocator2D::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkLocator.

Reimplemented in vtkMergePoints2D.

int vtkPointLocator2D::IsTypeOf const char *    type [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkLocator.

Reimplemented in vtkMergePoints2D.

virtual int vtkPointLocator2D::IsA const char *    type [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkLocator.

Reimplemented in vtkMergePoints2D.

vtkPointLocator2D* vtkPointLocator2D::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkLocator.

Reimplemented in vtkMergePoints2D.

void vtkPointLocator2D::PrintSelf ostream &    os,
vtkIndent    indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkLocator.

virtual void vtkPointLocator2D::SetDivisions int   ,
int   
[virtual]
 

Set the number of divisions in x-y directions.

void vtkPointLocator2D::SetDivisions int   [2]
 

virtual int* vtkPointLocator2D::GetDivisions   [virtual]
 

virtual void vtkPointLocator2D::GetDivisions int    data[2] [virtual]
 

virtual void vtkPointLocator2D::SetNumberOfPointsPerBucket int    [virtual]
 

Specify the average number of points in each bucket.

virtual int vtkPointLocator2D::GetNumberOfPointsPerBucket   [virtual]
 

virtual int vtkPointLocator2D::FindClosestPoint float    x[2] [virtual]
 

Given a position x, return the id of the point closest to it.

virtual int vtkPointLocator2D::IsInsertedPoint float    x[2] [virtual]
 

Determine whether point given by x[2] has been inserted into points list. Return id of previously inserted point if this is true, otherwise return -1.

Reimplemented in vtkMergePoints2D.

virtual void vtkPointLocator2D::FindClosestNPoints int    N,
float    x[2],
vtkIdList   result
[virtual]
 

Find the closest N points to a position. This returns the closest N points to a position. A faster method could be created that returned N close points to a position, but necessarily the exact N closest. The returned points are sorted from closest to farthest.

virtual void vtkPointLocator2D::FindClosestNPoints int    N,
float    x,
float    y,
vtkIdList   result
[virtual]
 

virtual void vtkPointLocator2D::FindDistributedPoints int    N,
float    x[2],
vtkIdList   result,
int    M
[virtual]
 

Find the closest points to a position such that each quadrant of space around the position contains at least N points. Loosely limit the search to a maximum number of points evaluated, M.

virtual void vtkPointLocator2D::FindDistributedPoints int    N,
float    x,
float    y,
vtkIdList   result,
int    M
[virtual]
 

virtual void vtkPointLocator2D::FindPointsWithinRadius float    R,
float    x[2],
vtkIdList   result
[virtual]
 

Find all points within a specified radius R of position x. The result is not sorted in any specific manner.

virtual void vtkPointLocator2D::FindPointsWithinRadius float    R,
float    x,
float    y,
vtkIdList   result
[virtual]
 

void vtkPointLocator2D::Initialize   [virtual]
 

See vtkLocator interface documentation.

Reimplemented from vtkLocator.

void vtkPointLocator2D::FreeSearchStructure   [virtual]
 

Free the memory required for the spatial data structure.

Reimplemented from vtkLocator.

void vtkPointLocator2D::BuildLocator   [virtual]
 

Build the locator from the input dataset.

Reimplemented from vtkLocator.

void vtkPointLocator2D::GenerateRepresentation int    level,
vtkPolyData   pd
[virtual]
 

Method to build a representation at a particular level. Note that the method GetLevel() returns the maximum number of levels available for the tree. You must provide a vtkPolyData object into which to place the data.

Reimplemented from vtkLocator.

virtual void vtkPointLocator2D::SetPoints vtkPoints   [virtual]
 

set the points to use when looking up a coordinate

virtual vtkPoints* vtkPointLocator2D::GetPoints   [virtual]
 

void vtkPointLocator2D::operator= const vtkPointLocator2D &    [inline, protected]
 

Definition at line 141 of file vtkPointLocator2D.h.

void vtkPointLocator2D::GetBucketNeighbors int    ijk[2],
int    ndivs[2],
int    level
[protected]
 

void vtkPointLocator2D::GetOverlappingBuckets float    x[2],
int    ijk[2],
float    dist,
int    level
[protected]
 

void vtkPointLocator2D::GenerateFace int    face,
int    i,
int    j,
int    k,
vtkPoints   pts,
vtkCellArray   polys
[protected]
 


Member Data Documentation

vtkPoints* vtkPointLocator2D::Points [protected]
 

Definition at line 149 of file vtkPointLocator2D.h.

int vtkPointLocator2D::Divisions[2] [protected]
 

Definition at line 150 of file vtkPointLocator2D.h.

int vtkPointLocator2D::NumberOfPointsPerBucket [protected]
 

Definition at line 151 of file vtkPointLocator2D.h.

float vtkPointLocator2D::Bounds[4] [protected]
 

Definition at line 152 of file vtkPointLocator2D.h.

vtkIdList** vtkPointLocator2D::HashTable [protected]
 

Definition at line 153 of file vtkPointLocator2D.h.

int vtkPointLocator2D::NumberOfBuckets [protected]
 

Definition at line 154 of file vtkPointLocator2D.h.

float vtkPointLocator2D::H[2] [protected]
 

Definition at line 155 of file vtkPointLocator2D.h.

vtkNeighborPoints* vtkPointLocator2D::Buckets [protected]
 

Definition at line 156 of file vtkPointLocator2D.h.

float vtkPointLocator2D::InsertionTol2 [protected]
 

Definition at line 157 of file vtkPointLocator2D.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 12:57:25 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001