3#include <CesiumGeometry/AxisAlignedBox.h> 
    4#include <CesiumGeometry/BoundingSphere.h> 
    5#include <CesiumGeometry/CullingResult.h> 
    6#include <CesiumGeometry/Library.h> 
    8#include <glm/mat3x3.hpp> 
   35      const glm::dvec3& center,
 
   36      const glm::dmat3& halfAxes) noexcept
 
   40        _inverseHalfAxes(glm::inverse(halfAxes)),
 
   42            2.0 * glm::length(_halfAxes[0]),
 
   43            2.0 * glm::length(_halfAxes[1]),
 
   44            2.0 * glm::length(_halfAxes[2])) {}
 
 
   49  constexpr const glm::dvec3& 
getCenter() const noexcept {
 
 
   59    return this->_halfAxes;
 
 
   67    return this->_inverseHalfAxes;
 
 
   73  constexpr const glm::dvec3& 
getLengths() const noexcept {
 
   74    return this->_lengths;
 
 
  109  bool contains(
const glm::dvec3& position) 
const noexcept;
 
  119  transform(
const glm::dmat4& transformation) 
const noexcept;
 
  145  glm::dmat3 _halfAxes;
 
  146  glm::dmat3 _inverseHalfAxes;
 
 
A bounding sphere with a center and a radius.
double computeDistanceSquaredToPosition(const glm::dvec3 &position) const noexcept
Computes the distance squared from a given position to the closest point on this bounding volume....
OrientedBoundingBox transform(const glm::dmat4 &transformation) const noexcept
Transforms this bounding box to another coordinate system using a 4x4 matrix.
constexpr const glm::dmat3 & getHalfAxes() const noexcept
Gets the three orthogonal half-axes of the bounding box. Equivalently, the transformation matrix to r...
CullingResult intersectPlane(const Plane &plane) const noexcept
Determines on which side of a plane the bounding box is located.
static OrientedBoundingBox fromAxisAligned(const AxisAlignedBox &axisAligned) noexcept
Creates an oriented bounding box from the given axis-aligned bounding box.
static OrientedBoundingBox fromSphere(const BoundingSphere &sphere) noexcept
Creates an oriented bounding box from the given bounding sphere.
AxisAlignedBox toAxisAligned() const noexcept
Converts this oriented bounding box to an axis-aligned bounding box.
OrientedBoundingBox(const glm::dvec3 ¢er, const glm::dmat3 &halfAxes) noexcept
Constructs a new instance.
constexpr const glm::dvec3 & getCenter() const noexcept
Gets the center of the box.
constexpr const glm::dmat3 & getInverseHalfAxes() const noexcept
Gets the inverse transformation matrix, to rotate from world space to local space relative to the box...
constexpr const glm::dvec3 & getLengths() const noexcept
Gets the lengths of the box on each local axis respectively.
BoundingSphere toSphere() const noexcept
Converts this oriented bounding box to a bounding sphere.
bool contains(const glm::dvec3 &position) const noexcept
Computes whether the given position is contained within the bounding box.
A plane in Hessian Normal Format.
Basic geometry classes for Cesium.
CullingResult
The result of culling an object.
An Axis-Aligned Bounding Box (AABB), where the axes of the box are aligned with the axes of the coord...