3#include <CesiumGeometry/Library.h>
5#include <glm/ext/vector_double3.hpp>
50 double maximumZ_) noexcept
121 constexpr bool contains(
const glm::dvec3& position)
const noexcept {
122 return position.x >= this->minimumX && position.x <= this->maximumX &&
123 position.y >= this->minimumY && position.y <= this->maximumY &&
124 position.z >= this->minimumZ && position.z <= this->maximumZ;
144bool CESIUMGEOMETRY_API
A bounding volume defined as a closed and convex cuboid with any orientation.
Basic geometry classes for Cesium.
bool intersects(const AxisAlignedBox &b0, const AxisAlignedBox &b1)
Test if two axis-aligned boxes intersect.
OrientedBoundingBox toOrientedBoundingBox(const AxisAlignedBox &box)
Return the equivalent OrientedBoundingBox for an AxisAlignedBox. The axes will be the principal axes.
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.
static AxisAlignedBox fromPositions(const std::vector< glm::dvec3 > &positions)
Creates a tight-fitting, axis-aligned bounding box that contains all of the input positions.
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.