Package geometry

Class Envelope

java.lang.Object
geometry.Envelope

public class Envelope
extends java.lang.Object
Extent as minimum bounding box
Author:
haunert
  • Constructor Summary

    Constructors 
    Constructor Description
    Envelope()
    Constructor
    Envelope​(double x1, double x2, double y1, double y2)  
  • Method Summary

    Modifier and Type Method Description
    boolean contains​(Envelope env)
    Checks whether this envelope contains another envelope
    void expandToInclude​(double x, double y)
    Expand the current envelope by a point (x,y)
    void expandToInclude​(Envelope boundingBox)
    Expand the current envelope by a bounding box
    double getxMax()  
    double getxMin()  
    double getyMax()  
    double getyMin()  
    boolean intersects​(Envelope boundingBox)
    Checks the intersection of two envelopes
    boolean isBounded()
    Checks whether the envelope is bounded or not
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Envelope

      public Envelope​(double x1, double x2, double y1, double y2)
    • Envelope

      public Envelope()
      Constructor
  • Method Details

    • getxMin

      public double getxMin()
      Returns:
      xMin
    • getyMin

      public double getyMin()
      Returns:
      yMin
    • getxMax

      public double getxMax()
      Returns:
      xMax
    • getyMax

      public double getyMax()
      Returns:
      yMax
    • expandToInclude

      public void expandToInclude​(double x, double y)
      Expand the current envelope by a point (x,y)
      Parameters:
      x - x coordinate of the point
      y - y coordinate of the point
    • expandToInclude

      public void expandToInclude​(Envelope boundingBox)
      Expand the current envelope by a bounding box
      Parameters:
      boundingBox - Bounding box
    • intersects

      public boolean intersects​(Envelope boundingBox)
      Checks the intersection of two envelopes
      Parameters:
      boundingBox - envelope to test
      Returns:
      boolean value for the result of the intersection check
    • isBounded

      public boolean isBounded()
      Checks whether the envelope is bounded or not
      Returns:
      boolean value for the bounding test
    • contains

      public boolean contains​(Envelope env)
      Checks whether this envelope contains another envelope
      Parameters:
      env - envelope to be tested
      Returns:
      boolean value for the containment test
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object