3#include <CesiumGeometry/Library.h>
4#include <CesiumGeometry/OrientedBoundingBox.h>
5#include <CesiumUtility/Math.h>
7#include <glm/gtc/quaternion.hpp>
8#include <glm/mat4x4.hpp>
56 const glm::dvec3& translation,
57 const glm::dquat& rotation,
59 const glm::dvec2& radialBounds,
60 const glm::dvec2& angularBounds = {
67 constexpr const glm::dvec3&
getCenter() const noexcept {
68 return this->_box.getCenter();
76 return this->_translation;
84 return this->_rotation;
90 constexpr double getHeight() const noexcept {
return this->_height; }
96 return this->_radialBounds;
103 return this->_angularBounds;
138 bool contains(
const glm::dvec3& position)
const noexcept;
148 transform(
const glm::dmat4& transformation)
const noexcept;
156 glm::dvec3 _translation;
157 glm::dquat _rotation;
159 glm::dvec2 _radialBounds;
160 glm::dvec2 _angularBounds;
A bounding volume defined as a region following the surface of a cylinder between two radius values....
double computeDistanceSquaredToPosition(const glm::dvec3 &position) const noexcept
Computes the distance squared from a given position to the closest point on the bounding volume....
bool contains(const glm::dvec3 &position) const noexcept
Computes whether the given position is contained within the bounding cylinder.
constexpr const glm::dvec2 & getAngularBounds() const noexcept
Gets the angular bounds of the cylinder region.
BoundingCylinderRegion(const glm::dvec3 &translation, const glm::dquat &rotation, double height, const glm::dvec2 &radialBounds, const glm::dvec2 &angularBounds={ -CesiumUtility::Math::OnePi, CesiumUtility::Math::OnePi}) noexcept
Construct a new bounding cylinder region.
constexpr const glm::dquat & getRotation() const noexcept
Gets the rotation that is applied to the bounding cylinder region.
constexpr double getHeight() const noexcept
Gets the height of the cylinder region.
CullingResult intersectPlane(const Plane &plane) const noexcept
Determines on which side of a plane the bounding cylinder is located.
constexpr const glm::dvec2 & getRadialBounds() const noexcept
Gets the radial bounds of the cylinder region.
constexpr const glm::dvec3 & getCenter() const noexcept
Gets the center of the cylinder region.
constexpr const glm::dvec3 & getTranslation() const noexcept
Gets the translation that is applied to the bounding cylinder region.
OrientedBoundingBox toOrientedBoundingBox() const noexcept
Converts this bounding cylinder region to an oriented bounding box.
BoundingCylinderRegion transform(const glm::dmat4 &transformation) const noexcept
Transforms this bounding cylinder region to another coordinate system using a 4x4 matrix.
A bounding volume defined as a closed and convex cuboid with any orientation.
A plane in Hessian Normal Format.
static constexpr double OnePi
Pi.
Basic geometry classes for Cesium.
CullingResult
The result of culling an object.