Package 

Class PointQuadTree


  • 
    public class PointQuadTree<T extends PointQuadTree.Item>
    
                        

    A quad tree which tracks items with a Point geometry. See http://en.wikipedia.org/wiki/Quadtree for details on the data structure. This class is not thread safe.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public interface PointQuadTree.Item
    • Constructor Summary

      Constructors 
      Constructor Description
      PointQuadTree(double minX, double maxX, double minY, double maxY) Creates a new quad tree with specified bounds.
      PointQuadTree(Bounds bounds)
    • Method Summary

      Modifier and Type Method Description
      void add(T item) Insert an item.
      boolean remove(T item) Remove the given item from the set.
      void clear() Removes all points from the quadTree
      Collection<T> search(Bounds searchBounds) Search for all items within a given bounds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PointQuadTree

        PointQuadTree(double minX, double maxX, double minY, double maxY)
        Creates a new quad tree with specified bounds.
      • PointQuadTree

        PointQuadTree(Bounds bounds)
    • Method Detail

      • add

         void add(T item)

        Insert an item.

      • remove

         boolean remove(T item)

        Remove the given item from the set.

      • clear

         void clear()

        Removes all points from the quadTree