cesium-native  0.41.0
BoundingVolume.h
1 #pragma once
2 
3 #include "Library.h"
4 
5 #include <CesiumGeometry/BoundingSphere.h>
6 #include <CesiumGeometry/OrientedBoundingBox.h>
7 #include <CesiumGeospatial/BoundingRegion.h>
8 #include <CesiumGeospatial/BoundingRegionWithLooseFittingHeights.h>
9 #include <CesiumGeospatial/Ellipsoid.h>
10 #include <CesiumGeospatial/GlobeRectangle.h>
11 #include <CesiumGeospatial/S2CellBoundingVolume.h>
12 
13 #include <optional>
14 #include <variant>
15 
17 
29 typedef std::variant<
36 
48 CESIUM3DTILESSELECTION_API BoundingVolume transformBoundingVolume(
49  const glm::dmat4x4& transform,
50  const BoundingVolume& boundingVolume);
51 
58 CESIUM3DTILESSELECTION_API glm::dvec3
59 getBoundingVolumeCenter(const BoundingVolume& boundingVolume);
60 
69 CESIUM3DTILESSELECTION_API std::optional<CesiumGeospatial::GlobeRectangle>
71  const BoundingVolume& boundingVolume,
72  const CesiumGeospatial::Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID);
73 
82 CESIUM3DTILESSELECTION_API const CesiumGeospatial::BoundingRegion*
84 
91 CESIUM3DTILESSELECTION_API CesiumGeometry::OrientedBoundingBox
93  const BoundingVolume& boundingVolume,
94  const CesiumGeospatial::Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID);
95 
96 } // namespace Cesium3DTilesSelection
A bounding sphere with a center and a radius.
A bounding volume defined as a closed and convex cuboid with any orientation.
A BoundingRegion whose heights might be very inaccurate and so distances should be estimated conserva...
A bounding volume specified as a longitude/latitude bounding box and a minimum and maximum height.
A quadratic surface defined in Cartesian coordinates.
Definition: Ellipsoid.h:38
Classes that implement the 3D Tiles standard.
CesiumGeometry::OrientedBoundingBox getOrientedBoundingBoxFromBoundingVolume(const BoundingVolume &boundingVolume, const CesiumGeospatial::Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID)
Returns an oriented bounding box that contains the given BoundingVolume.
const CesiumGeospatial::BoundingRegion * getBoundingRegionFromBoundingVolume(const BoundingVolume &boundingVolume)
Returns the bounding region if the bounding volume is a BoundingRegion or a BoundingRegionWithLooseFi...
std::variant< CesiumGeometry::BoundingSphere, CesiumGeometry::OrientedBoundingBox, CesiumGeospatial::BoundingRegion, CesiumGeospatial::BoundingRegionWithLooseFittingHeights, CesiumGeospatial::S2CellBoundingVolume > BoundingVolume
A bounding volume.
glm::dvec3 getBoundingVolumeCenter(const BoundingVolume &boundingVolume)
Returns the center of the given BoundingVolume.
BoundingVolume transformBoundingVolume(const glm::dmat4x4 &transform, const BoundingVolume &boundingVolume)
Transform the given BoundingVolume with the given matrix.
std::optional< CesiumGeospatial::GlobeRectangle > estimateGlobeRectangle(const BoundingVolume &boundingVolume, const CesiumGeospatial::Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID)
Estimates the bounding CesiumGeospatial::GlobeRectangle of the given BoundingVolume.