Class Bounded

java.lang.Object
org.djutils.quadtree.Bounded
All Implemented Interfaces:
Envelope

class Bounded extends Object implements Envelope
Simple object that implements BoundingBoxed.
  • Constructor Details

    • Bounded

      Bounded(Point2D.Double[] points, String id)
      Construct a new Bounded object for testing.
      Parameters:
      points - Point2D.Double[]; array of Point2D.Double
      id - String; id of the test object
  • Method Details

    • getBoundingRectangle

      public Rectangle getBoundingRectangle()
      Specified by:
      getBoundingRectangle in interface Envelope
    • intersects

      public boolean intersects(Rectangle rectangle)
      Determine if this object intersects a given Rectangle.
      Parameters:
      rectangle - Rectangle; the rectangle
      Returns:
      boolean; true if this object intersects the given Rectangle; false if this object does not intersect the given Rectangle
    • toString

      public String toString()
      Overrides:
      toString in class Object