47 double maximumZ_) noexcept
48 : minimumX(minimumX_),
54 lengthX(maximumX - minimumX),
55 lengthY(maximumY - minimumY),
56 lengthZ(maximumZ - minimumZ),
58 0.5 * (maximumX + minimumX),
59 0.5 * (maximumY + minimumY),
60 0.5 * (maximumZ + minimumZ)) {}
118 constexpr bool contains(
const glm::dvec3& position)
const noexcept {
119 return position.x >= this->minimumX && position.x <= this->maximumX &&
120 position.y >= this->minimumY && position.y <= this->maximumY &&
121 position.z >= this->minimumZ && position.z <= this->maximumZ;
Basic geometry classes for Cesium.
An Axis-Aligned Bounding Box (AABB), where the axes of the box are aligned with the axes of the coord...
double maximumY
The maximum y-coordinate.
constexpr AxisAlignedBox() noexcept
Creates an empty AABB with a length, width, and height of zero, with the center located at (0,...
double lengthY
The length of the box on the y-axis.
constexpr AxisAlignedBox(double minimumX_, double minimumY_, double minimumZ_, double maximumX_, double maximumY_, double maximumZ_) noexcept
Creates a new AABB using the range of coordinates the box covers.
double lengthX
The length of the box on the x-axis.
double minimumY
The minimum y-coordinate.
double minimumZ
The minimum z-coordinate.
double maximumX
The maximum x-coordinate.
glm::dvec3 center
The center of the box.
constexpr bool contains(const glm::dvec3 &position) const noexcept
Checks if this AABB contains the given position.
double minimumX
The minimum x-coordinate.
double maximumZ
The maximum z-coordinate.
double lengthZ
The length of the box on the z-axis.