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 TypeMethodDescriptionvoid
addBoundingBox
(GaiaBoundingBox boundingBox) void
addPoint
(double x, double y, double z) void
addPoint
(org.joml.Vector3d vector3d) clone()
boolean
contains
(GaiaBoundingBox boundingBox) convertLocalToLonlatBoundingBox
(org.joml.Vector3d center) void
expand
(double value) void
expandXYZ
(double valueX, double valueY, double valueZ) org.joml.Vector3d
double
double
double
double
double
org.joml.Vector3d
double
org.joml.Vector3d
double
double
getSizeX()
double
getSizeY()
double
getSizeZ()
org.joml.Vector3d
boolean
intersects
(GaiaBoundingBox bbox) boolean
intersects
(GaiaBoundingBox bbox, double tolerance) boolean
intersectsPointXY
(double pos_x, double pos_y) boolean
intersectsPointXYWithXAxis
(double posX) boolean
intersectsPointXYWithYAxis
(double posY) boolean
intersectsRectangleXY
(double min_x, double min_y, double max_x, double max_y) boolean
void
set
(GaiaBoundingBox bbox) void
setFromPoints
(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
-