Class GaiaRectangle

java.lang.Object
com.gaia3d.basic.geometry.GaiaRectangle
All Implemented Interfaces:
Serializable

public class GaiaRectangle extends Object implements Serializable
GaiaRectangle is a class to store the bounding rectangle of a geometry. It can be used to calculate the center and volume of the geometry. It can also be used to convert the local bounding rectangle to lonlat bounding rectangle. It can also be used to calculate the longest distance of the geometry.
See Also:
  • Constructor Details

    • GaiaRectangle

      public GaiaRectangle(org.joml.Vector2d minPoint, org.joml.Vector2d maxPoint)
    • GaiaRectangle

      public GaiaRectangle(GaiaRectangle rect)
  • Method Details

    • getCenter

      public org.joml.Vector2d getCenter()
    • getVolume

      public org.joml.Vector2d getVolume()
    • getCenterCorrected

      public org.joml.Vector2d getCenterCorrected()
    • getRange

      public org.joml.Vector2d getRange()
    • getLeftBottomPoint

      public org.joml.Vector2d getLeftBottomPoint()
    • getRightTopPoint

      public org.joml.Vector2d getRightTopPoint()
    • getBoundingArea

      public double getBoundingArea()
    • getArea

      public double getArea()
    • getPerimeter

      public double getPerimeter()
    • setInit

      public void setInit(org.joml.Vector2d vector2d)
    • addPoint

      public void addPoint(org.joml.Vector2d vector2d)
    • addPoint

      public void addPoint(double x, double y)
    • translate

      public void translate(org.joml.Vector2d vector2d)
    • addBoundingRectangle

      public void addBoundingRectangle(GaiaRectangle boundingRectangle)
    • getWidth

      public double getWidth()
    • getHeight

      public double getHeight()
    • getWidthInt

      public int getWidthInt()
    • getHeightInt

      public int getHeightInt()
    • copyFrom

      public void copyFrom(GaiaRectangle rectangle)
    • intersects

      public boolean intersects(GaiaRectangle compare, double error)
    • intersectsInXAxis

      public boolean intersectsInXAxis(GaiaRectangle compare)
    • intersectsInYAxis

      public boolean intersectsInYAxis(GaiaRectangle compare)
    • intersectsInSomeAxis

      public boolean intersectsInSomeAxis(GaiaRectangle compare)
    • clone

      public GaiaRectangle clone()
    • setSize

      public void setSize(double minX, double minY, double maxX, double maxY)