Package com.gaia3d.basic.geometry
Class GaiaBoundingBox
java.lang.Object
com.gaia3d.basic.geometry.GaiaBoundingBox
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBoundingBox(GaiaBoundingBox boundingBox) voidaddPoint(double x, double y, double z) voidaddPoint(org.joml.Vector3d vector3d) clone()booleancontains(GaiaBoundingBox boundingBox) convertLocalToLonlatBoundingBox(org.joml.Vector3d center) voidexpand(double value) voidexpandXYZ(double valueX, double valueY, double valueZ) org.joml.Vector3ddoubledoubledoubledoubledoubleorg.joml.Vector3ddoubleorg.joml.Vector3ddoubledoublegetSizeX()doublegetSizeY()doublegetSizeZ()org.joml.Vector3dbooleanintersects(GaiaBoundingBox bbox) booleanintersects(GaiaBoundingBox bbox, double tolerance) booleanintersectsPointXY(double pos_x, double pos_y) booleanintersectsPointXYWithXAxis(double posX) booleanintersectsPointXYWithYAxis(double posY) booleanintersectsRectangleXY(double min_x, double min_y, double max_x, double max_y) booleanvoidset(GaiaBoundingBox bbox) voidsetFromPoints(List<org.joml.Vector3d> transformedVertices)
-
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
-
addPoint
public void addPoint(double x, double y, double z) -
addPoint
public void addPoint(org.joml.Vector3d vector3d) -
intersects
-
intersects
-
addBoundingBox
-
convertLocalToLonlatBoundingBox
-
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
-
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
-
expand
public void expand(double value) -
expandXYZ
public void expandXYZ(double valueX, double valueY, double valueZ) -
isBoxInside
-