Documentation of 'org.jhotdraw.geom.QuadTree' Java class
QuadTree
org.jhotdraw.geom

Class QuadTree<T>

  • All Implemented Interfaces:
    java.io.Serializable


    public class QuadTree<T>
    extends java.lang.Object
    implements java.io.Serializable
    A QuadTree allows to quickly find an object on a two-dimensional space.

    QuadTree recursively subdivides a space into four rectangles. Each node of a QuadTree subdivides the space covered by the rectangle of its parent node into four smaller rectangles covering the upper left, upper right, lower left and lower right quadrant of the parent rectangle.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      QuadTree()
      Creates a new instance.
      QuadTree(java.awt.geom.Rectangle2D.Double bounds) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(T o, java.awt.geom.Rectangle2D.Double bounds) 
      java.util.Collection<T> findContains(java.awt.geom.Point2D.Double p) 
      java.util.Collection<T> findInside(java.awt.geom.Rectangle2D.Double r) 
      java.util.Collection<T> findIntersects(java.awt.geom.Rectangle2D.Double r) 
      java.util.Collection<T> findIntersects(java.awt.geom.Rectangle2D r) 
      void remove(T o) 
      void reorganize() 
      • Methods inherited from class java.lang.Object

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

      • QuadTree

        public QuadTree()
        Creates a new instance.
      • QuadTree

        public QuadTree(java.awt.geom.Rectangle2D.Double bounds)
    • Method Detail

      • add

        public void add(T o,
                        java.awt.geom.Rectangle2D.Double bounds)
      • reorganize

        public void reorganize()
      • remove

        public void remove(T o)
      • findContains

        public java.util.Collection<T> findContains(java.awt.geom.Point2D.Double p)
      • findIntersects

        public java.util.Collection<T> findIntersects(java.awt.geom.Rectangle2D r)
      • findIntersects

        public java.util.Collection<T> findIntersects(java.awt.geom.Rectangle2D.Double r)
      • findInside

        public java.util.Collection<T> findInside(java.awt.geom.Rectangle2D.Double r)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.