vtk
Class vtkPointLocator

java.lang.Object
  extended byvtk.vtkObjectBase
      extended byvtk.vtkObject
          extended byvtk.vtkLocator
              extended byvtk.vtkPointLocator
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
vtkMergePoints

public class vtkPointLocator
extends vtkLocator
implements java.io.Serializable

vtkPointLocator - quickly locate points in 3-space. vtkPointLocator is a spatial search object to quickly locate points in 3D. vtkPointLocator 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 3D and finding the closest point. vtkPointLocator 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. JavaBean wrapper for vtkPointLocator object.

Author:
vtk2jbean Automatic JavaBean wrapper for VTK.
See Also:
vtkCellPicker, Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport changes
           
 
Fields inherited from class vtk.vtkObjectBase
vtkId
 
Constructor Summary
  vtkPointLocator()
           
protected vtkPointLocator(int dmy)
           
 
Method Summary
 void buildLocator()
          See vtkLocator interface documentation.
 int findClosestInsertedPoint(double[] id0)
          Given a position x, return the id of the point closest to it.
 void findClosestNPoints(int id0, double[] id1, vtkIdList id2)
          Find the closest N points to a position.
 void findClosestNPoints(int id0, double id1, double id2, double id3, vtkIdList id4)
          Find the closest N points to a position.
 int findClosestPoint(double[] id0)
          Given a position x, return the id of the point closest to it.
 int findClosestPoint(double id0, double id1, double id2)
          Given a position x, return the id of the point closest to it.
 void findDistributedPoints(int id0, double[] id1, vtkIdList id2, int id3)
          Find the closest points to a position such that each octant of space around the position contains at least N points.
 void findDistributedPoints(int id0, double id1, double id2, double id3, vtkIdList id4, int id5)
          Find the closest points to a position such that each octant of space around the position contains at least N points.
 void findPointsWithinRadius(double id0, double[] id1, vtkIdList id2)
          Find all points within a specified radius R of position x.
 void findPointsWithinRadius(double id0, double id1, double id2, double id3, vtkIdList id4)
          Find all points within a specified radius R of position x.
 void freeSearchStructure()
          See vtkLocator interface documentation.
 void generateRepresentation(int id0, vtkPolyData id1)
          See vtkLocator interface documentation.
 java.lang.String getClassName()
          Return the class name as a string.
 int[] getDivisions()
          Set the number of divisions in x-y-z directions.
 int getNumberOfPointsPerBucket()
          Specify the average number of points in each bucket.
 int getNumberOfPointsPerBucketMaxValue()
          Specify the average number of points in each bucket.
 int getNumberOfPointsPerBucketMinValue()
          Specify the average number of points in each bucket.
 vtkIdList getPointsInBucket(double[] id0, int[] id1)
          Given a position x, return the list of points in the bucket that contains the point.
 vtkPointLocator getThisPointLocator()
           
 void initialize()
          See vtkLocator interface documentation.
 int initPointInsertion(vtkPoints id0, double[] id1)
          Initialize the point insertion process.
 int initPointInsertion(vtkPoints id0, double[] id1, int id2)
          Initialize the point insertion process.
 int insertNextPoint(double[] id0)
          Incrementally insert a point into search structure.
 void insertPoint(int id0, double[] id1)
          Incrementally insert a point into search structure with a particular index value.
 int isA(java.lang.String id0)
          Return 1 if this class is the same type of (or a subclass of) the named class.
 int isInsertedPoint(double[] id0)
          Determine whether point given by x[3] has been inserted into points list.
 int isInsertedPoint(double id0, double id1, double id2)
          Determine whether point given by x[3] has been inserted into points list.
 void setDivisions(int[] id0)
          Set the number of divisions in x-y-z directions.
 void setDivisions(int id0, int id1, int id2)
          Set the number of divisions in x-y-z directions.
 void setNumberOfPointsPerBucket(int id0)
          Specify the average number of points in each bucket.
protected  void VTKCastInit()
           
 void VTKInit()
           
 
Methods inherited from class vtk.vtkLocator
automaticOff, automaticOn, getAutomatic, getBuildTime, getDataSet, getLevel, getMaxLevel, getMaxLevelMaxValue, getMaxLevelMinValue, getRetainCellLists, getThisLocator, getTolerance, getToleranceMaxValue, getToleranceMinValue, retainCellListsOff, retainCellListsOn, setAutomatic, setDataSet, setMaxLevel, setRetainCellLists, setTolerance, update
 
Methods inherited from class vtk.vtkObject
AddObserver, breakOnError, debugOff, debugOn, getDebug, getGlobalWarningDisplay, getMTime, getThisObject, globalWarningDisplayOff, globalWarningDisplayOn, hasObserver, hasObserver, invokeEvent, invokeEvent, modified, Print, PrintRevisions, register, removeObserver, removeObservers, removeObservers, setDebug, setGlobalWarningDisplay, unRegister
 
Methods inherited from class vtk.vtkObjectBase
addPropertyChangeListener, finalize, getReferenceCount, getThisObjectBase, isTypeOf, removePropertyChangeListener, setReferenceCount, VTKDelete
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changes

protected java.beans.PropertyChangeSupport changes
Constructor Detail

vtkPointLocator

public vtkPointLocator()

vtkPointLocator

protected vtkPointLocator(int dmy)
Method Detail

getThisPointLocator

public vtkPointLocator getThisPointLocator()

getClassName

public java.lang.String getClassName()
Description copied from class: vtkObjectBase
Return the class name as a string. This method is defined in all subclasses of vtkObjectBase with the vtkTypeRevisionMacro found in vtkSetGet.h.

Overrides:
getClassName in class vtkLocator

isA

public int isA(java.lang.String id0)
Description copied from class: vtkObjectBase
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 vtkTypeRevisionMacro found in vtkSetGet.h.

Overrides:
isA in class vtkLocator

setDivisions

public void setDivisions(int id0,
                         int id1,
                         int id2)
Set the number of divisions in x-y-z directions.


setDivisions

public void setDivisions(int[] id0)
Set the number of divisions in x-y-z directions.


getDivisions

public int[] getDivisions()
Set the number of divisions in x-y-z directions.


setNumberOfPointsPerBucket

public void setNumberOfPointsPerBucket(int id0)
Specify the average number of points in each bucket.


getNumberOfPointsPerBucketMinValue

public int getNumberOfPointsPerBucketMinValue()
Specify the average number of points in each bucket.


getNumberOfPointsPerBucketMaxValue

public int getNumberOfPointsPerBucketMaxValue()
Specify the average number of points in each bucket.


getNumberOfPointsPerBucket

public int getNumberOfPointsPerBucket()
Specify the average number of points in each bucket.


findClosestPoint

public int findClosestPoint(double[] id0)
Given a position x, return the id of the point closest to it. Alternative method requires separate x-y-z values. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.


findClosestPoint

public int findClosestPoint(double id0,
                            double id1,
                            double id2)
Given a position x, return the id of the point closest to it. Alternative method requires separate x-y-z values. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.


initPointInsertion

public int initPointInsertion(vtkPoints id0,
                              double[] id1)
Initialize the point insertion process. The newPts is an object representing point coordinates into which incremental insertion methods place their data. Bounds are the box that the points lie in. Not thread safe.


initPointInsertion

public int initPointInsertion(vtkPoints id0,
                              double[] id1,
                              int id2)
Initialize the point insertion process. The newPts is an object representing point coordinates into which incremental insertion methods place their data. Bounds are the box that the points lie in. Not thread safe.


insertPoint

public void insertPoint(int id0,
                        double[] id1)
Incrementally insert a point into search structure with a particular index value. You should use the method IsInsertedPoint() to see whether this point has already been inserted (that is, if you desire to prevent duplicate points). Before using this method you must make sure that newPts have been supplied, the bounds has been set properly, and that divs are properly set. (See InitPointInsertion().) Not thread safe.


insertNextPoint

public int insertNextPoint(double[] id0)
Incrementally insert a point into search structure. The method returns the insertion location (i.e., point id). You should use the method IsInsertedPoint() to see whether this point has already been inserted (that is, if you desire to prevent duplicate points). Before using this method you must make sure that newPts have been supplied, the bounds has been set properly, and that divs are properly set. (See InitPointInsertion().) Not thread safe.


isInsertedPoint

public int isInsertedPoint(double id0,
                           double id1,
                           double id2)
Determine whether point given by x[3] has been inserted into points list. Return id of previously inserted point if this is true, otherwise return -1. This method is thread safe.


isInsertedPoint

public int isInsertedPoint(double[] id0)
Determine whether point given by x[3] has been inserted into points list. Return id of previously inserted point if this is true, otherwise return -1. This method is thread safe.


findClosestInsertedPoint

public int findClosestInsertedPoint(double[] id0)
Given a position x, return the id of the point closest to it. This method is used when performing incremental point insertion. Note that -1 indicates that no point was found. This method is thread safe if BuildLocator() is directly or indirectly called from a single thread first.


findClosestNPoints

public void findClosestNPoints(int id0,
                               double[] id1,
                               vtkIdList id2)
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. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.


findClosestNPoints

public void findClosestNPoints(int id0,
                               double id1,
                               double id2,
                               double id3,
                               vtkIdList id4)
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. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.


findDistributedPoints

public void findDistributedPoints(int id0,
                                  double[] id1,
                                  vtkIdList id2,
                                  int id3)
Find the closest points to a position such that each octant of space around the position contains at least N points. Loosely limit the search to a maximum number of points evaluated, M. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.


findDistributedPoints

public void findDistributedPoints(int id0,
                                  double id1,
                                  double id2,
                                  double id3,
                                  vtkIdList id4,
                                  int id5)
Find the closest points to a position such that each octant of space around the position contains at least N points. Loosely limit the search to a maximum number of points evaluated, M. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.


findPointsWithinRadius

public void findPointsWithinRadius(double id0,
                                   double[] id1,
                                   vtkIdList id2)
Find all points within a specified radius R of position x. The result is not sorted in any specific manner. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.


findPointsWithinRadius

public void findPointsWithinRadius(double id0,
                                   double id1,
                                   double id2,
                                   double id3,
                                   vtkIdList id4)
Find all points within a specified radius R of position x. The result is not sorted in any specific manner. These methods are thread safe if BuildLocator() is directly or indirectly called from a single thread first.


getPointsInBucket

public vtkIdList getPointsInBucket(double[] id0,
                                   int[] id1)
Given a position x, return the list of points in the bucket that contains the point. It is possible that NULL is returned. The user provides an ijk array that is the indices into the locator. This method is thread safe.


initialize

public void initialize()
See vtkLocator interface documentation. These methods are not thread safe.

Overrides:
initialize in class vtkLocator

freeSearchStructure

public void freeSearchStructure()
See vtkLocator interface documentation. These methods are not thread safe.

Overrides:
freeSearchStructure in class vtkLocator

buildLocator

public void buildLocator()
See vtkLocator interface documentation. These methods are not thread safe.

Overrides:
buildLocator in class vtkLocator

generateRepresentation

public void generateRepresentation(int id0,
                                   vtkPolyData id1)
See vtkLocator interface documentation. These methods are not thread safe.

Overrides:
generateRepresentation in class vtkLocator

VTKInit

public void VTKInit()
Overrides:
VTKInit in class vtkObject

VTKCastInit

protected void VTKCastInit()
Overrides:
VTKCastInit in class vtkLocator


Copyright © 2004 Sydney ViSLAB. All Rights Reserved.