Class GaiaBoundingBox

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

public class GaiaBoundingBox extends Object implements Serializable
GaiaBoundingBox is a class to store the bounding box 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 box to lonlat bounding box. It can also be used to calculate the longest distance of the geometry.
See Also:
  • Constructor Details

    • GaiaBoundingBox

      public GaiaBoundingBox()
  • Method Details

    • getCenter

      public org.joml.Vector3d getCenter()
    • getMinPosition

      public org.joml.Vector3d getMinPosition()
    • getMaxPosition

      public org.joml.Vector3d getMaxPosition()
    • getVolume

      public org.joml.Vector3d getVolume()
    • set

      public void set(GaiaBoundingBox bbox)
    • addPoint

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

      public void addPoint(org.joml.Vector3d vector3d)
    • intersects

      public boolean intersects(GaiaBoundingBox bbox)
    • intersects

      public boolean intersects(GaiaBoundingBox bbox, double tolerance)
    • addBoundingBox

      public void addBoundingBox(GaiaBoundingBox boundingBox)
    • convertLocalToLonlatBoundingBox

      public GaiaBoundingBox convertLocalToLonlatBoundingBox(org.joml.Vector3d center)
    • getLongestDistance

      public double getLongestDistance()
    • getSizeX

      public double getSizeX()
    • getSizeY

      public double getSizeY()
    • getSizeZ

      public double getSizeZ()
    • getMaxSize

      public double getMaxSize()
    • getMinSize

      public double getMinSize()
    • contains

      public boolean contains(GaiaBoundingBox boundingBox)
    • clone

      public GaiaBoundingBox clone()
    • intersectsPointXY

      public boolean intersectsPointXY(double pos_x, double pos_y)
    • intersectsRectangleXY

      public boolean intersectsRectangleXY(double min_x, double min_y, double max_x, double max_y)
    • intersectsPointXYWithXAxis

      public boolean intersectsPointXYWithXAxis(double posX)
    • intersectsPointXYWithYAxis

      public boolean intersectsPointXYWithYAxis(double posY)
    • getLengthX

      public double getLengthX()
    • getLengthY

      public double getLengthY()
    • getLengthZ

      public double getLengthZ()
    • getLongestDistanceXY

      public double getLongestDistanceXY()
    • setFromPoints

      public void setFromPoints(List<org.joml.Vector3d> transformedVertices)
    • expand

      public void expand(double value)
    • expandXYZ

      public void expandXYZ(double valueX, double valueY, double valueZ)
    • isBoxInside

      public boolean isBoxInside(GaiaBoundingBox box)