cesium-native 0.43.0
Loading...
Searching...
No Matches
TileBoundingVolumes.h
1#pragma once
2
3#include <CesiumGeometry/BoundingSphere.h>
4#include <CesiumGeometry/OrientedBoundingBox.h>
5#include <CesiumGeospatial/BoundingRegion.h>
6#include <CesiumGeospatial/S2CellBoundingVolume.h>
7
8#include <optional>
9
10namespace Cesium3DTiles {
11struct BoundingVolume;
12}
13
14namespace Cesium3DTilesContent {
15
21public:
30 static std::optional<CesiumGeometry::OrientedBoundingBox>
32
43 Cesium3DTiles::BoundingVolume& boundingVolume,
44 const CesiumGeometry::OrientedBoundingBox& boundingBox);
45
55 static std::optional<CesiumGeospatial::BoundingRegion> getBoundingRegion(
56 const Cesium3DTiles::BoundingVolume& boundingVolume,
57 const CesiumGeospatial::Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID);
58
68 static void setBoundingRegion(
69 Cesium3DTiles::BoundingVolume& boundingVolume,
70 const CesiumGeospatial::BoundingRegion& boundingRegion);
71
80 static std::optional<CesiumGeometry::BoundingSphere>
82
92 static void setBoundingSphere(
93 Cesium3DTiles::BoundingVolume& boundingVolume,
94 const CesiumGeometry::BoundingSphere& boundingSphere);
95
108 static std::optional<CesiumGeospatial::S2CellBoundingVolume>
110 const Cesium3DTiles::BoundingVolume& boundingVolume,
111 const CesiumGeospatial::Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID);
112
125 Cesium3DTiles::BoundingVolume& boundingVolume,
126 const CesiumGeospatial::S2CellBoundingVolume& s2BoundingVolume);
127};
128
129} // namespace Cesium3DTilesContent
Provides functions for extracting bounding volumes types from the vectors stored in Cesium3DTiles::Bo...
static void setBoundingRegion(Cesium3DTiles::BoundingVolume &boundingVolume, const CesiumGeospatial::BoundingRegion &boundingRegion)
Sets the region property in a Cesium3DTiles::BoundingVolume based on a CesiumGeospatial::BoundingRegi...
static void setBoundingSphere(Cesium3DTiles::BoundingVolume &boundingVolume, const CesiumGeometry::BoundingSphere &boundingSphere)
Sets the sphere property in a Cesium3DTiles::BoundingVolume based on a CesiumGeometry::BoundingSphere...
static std::optional< CesiumGeospatial::S2CellBoundingVolume > getS2CellBoundingVolume(const Cesium3DTiles::BoundingVolume &boundingVolume, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84)
Gets the S2 cell bounding volume defined in the 3DTILES_bounding_volume_S2 extension of a Cesium3DTil...
static void setOrientedBoundingBox(Cesium3DTiles::BoundingVolume &boundingVolume, const CesiumGeometry::OrientedBoundingBox &boundingBox)
Sets the box property in a Cesium3DTiles::BoundingVolume based on an CesiumGeometry::OrientedBounding...
static std::optional< CesiumGeometry::OrientedBoundingBox > getOrientedBoundingBox(const Cesium3DTiles::BoundingVolume &boundingVolume)
Gets the bounding box defined in a Cesium3DTiles::BoundingVolume, if any.
static void setS2CellBoundingVolume(Cesium3DTiles::BoundingVolume &boundingVolume, const CesiumGeospatial::S2CellBoundingVolume &s2BoundingVolume)
Adds the 3DTILES_bounding_volume_S2 extension to a Cesium3DTiles::BoundingVolume based on a CesiumGeo...
static std::optional< CesiumGeospatial::BoundingRegion > getBoundingRegion(const Cesium3DTiles::BoundingVolume &boundingVolume, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84)
Gets the bounding region defined in a Cesium3DTiles::BoundingVolume, if any.
static std::optional< CesiumGeometry::BoundingSphere > getBoundingSphere(const Cesium3DTiles::BoundingVolume &boundingVolume)
Gets the bounding sphere defined in a Cesium3DTiles::BoundingVolume, if any.
A bounding sphere with a center and a radius.
A bounding volume defined as a closed and convex cuboid with any orientation.
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 support loading and converting 3D Tiles tile content.
std::variant< CesiumGeometry::BoundingSphere, CesiumGeometry::OrientedBoundingBox, CesiumGeospatial::BoundingRegion, CesiumGeospatial::BoundingRegionWithLooseFittingHeights, CesiumGeospatial::S2CellBoundingVolume > BoundingVolume
A bounding volume.
Classes for using 3D Tiles.
Definition Buffer.h:7
A bounding volume that encloses a tile or its content. At least one bounding volume property is requi...