us.ihmc.utilities.math.geometry
Class BoundingBoxKDTree2D

java.lang.Object
  extended by us.ihmc.utilities.math.geometry.BoundingBoxKDTree2D

public class BoundingBoxKDTree2D
extends java.lang.Object

Title:

BoundingBoxKDTree2D

Description:

This class searches for bounding boxes present in a user-defined rectangular region by constructing a KDTree for bounding boxes and then applying range search to the KDTree.

Copyright: Copyright (c) 2006

Company:

Version:
1.0
Author:
not attributable

Constructor Summary
BoundingBoxKDTree2D(java.util.ArrayList<BoundingBox2d> boundingBoxes, java.util.ArrayList<java.lang.Object> objects)
          Constructor Builds KDTree with the bounding boxes Bounding Boxes must be 2 dimensional rectangles oriented along X and Y axes.
 
Method Summary
 java.util.ArrayList<BoundingBox2d> getIntersectingBoundingBoxes(BoundingBox2d searchBox)
          Searches for bounding boxes present in/intersecting with a user-defined rectangular search region.
 java.util.ArrayList<java.lang.Object> getIntersectingObjects(BoundingBox2d searchBox)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoundingBoxKDTree2D

public BoundingBoxKDTree2D(java.util.ArrayList<BoundingBox2d> boundingBoxes,
                           java.util.ArrayList<java.lang.Object> objects)
Constructor Builds KDTree with the bounding boxes Bounding Boxes must be 2 dimensional rectangles oriented along X and Y axes.

Parameters:
ArrayList - boundingBoxes The list of the polygon to search from.
Method Detail

getIntersectingBoundingBoxes

public java.util.ArrayList<BoundingBox2d> getIntersectingBoundingBoxes(BoundingBox2d searchBox)
Searches for bounding boxes present in/intersecting with a user-defined rectangular search region. Search region must be a 2 dimensional rectangle oriented along X and Y axes.

Parameters:
BoundingBox2d - searchBox The rectangular search region.
Returns:
ArrayList The bounding boxes present in/intersecting with the search region.

getIntersectingObjects

public java.util.ArrayList<java.lang.Object> getIntersectingObjects(BoundingBox2d searchBox)