A BoundingRegion whose heights might be very inaccurate and so distances should be estimated conservatively for level-of-detail computations.
More...
#include <CesiumGeospatial/BoundingRegionWithLooseFittingHeights.h>
A BoundingRegion whose heights might be very inaccurate and so distances should be estimated conservatively for level-of-detail computations.
An instance of this class serves as a marker of the imprecision of the heights in a BoundingRegion, and also has a BoundingRegionWithLooseFittingHeights::computeConservativeDistanceSquaredToPosition method to compute the conservative distance metric.
Definition at line 18 of file BoundingRegionWithLooseFittingHeights.h.
◆ BoundingRegionWithLooseFittingHeights()
CesiumGeospatial::BoundingRegionWithLooseFittingHeights::BoundingRegionWithLooseFittingHeights |
( |
const BoundingRegion & |
boundingRegion | ) |
|
|
noexcept |
Constructs a new bounding region.
- Parameters
-
boundingRegion | The bounding region that has imprecise heights. |
◆ computeConservativeDistanceSquaredToPosition() [1/3]
double CesiumGeospatial::BoundingRegionWithLooseFittingHeights::computeConservativeDistanceSquaredToPosition |
( |
const Cartographic & |
cartographicPosition, |
|
|
const glm::dvec3 & |
cartesianPosition |
|
) |
| const |
|
noexcept |
Computes the conservative distance-squared from a position to the closest point in this bounding region, when the longitude-latitude-height and ellipsoid-centered Cartesian coordinates of the position are both already known.
It is conservative in that the distance is computed using whichever is farther away of this bounding region's imprecise minimum and maximum heights, so the returned distance may be greater than what the distance to the bounding region would be if the heights were precise. When used for level-of-detail selection, this ensures that imprecise selection caused by the imprecise heights will cause too little detail to be loaded rather than too much detail. This is important because overestimating the required level-of-detail can require an excessive number of tiles to be loaded.
- Parameters
-
cartographicPosition | The position as a longitude-latitude-height. |
cartesianPosition | The position as ellipsoid-centered Cartesian coordinates. |
- Returns
- The distance-squared from the position to the closest point in the bounding region.
◆ computeConservativeDistanceSquaredToPosition() [2/3]
double CesiumGeospatial::BoundingRegionWithLooseFittingHeights::computeConservativeDistanceSquaredToPosition |
( |
const Cartographic & |
position, |
|
|
const Ellipsoid &ellipsoid |
CESIUM_DEFAULT_ELLIPSOID |
|
) |
| const |
|
noexcept |
Computes the conservative distance-squared from a longitude-latitude-height position to the closest point in this bounding region.
It is conservative in that the distance is computed using whichever is farther away of this bounding region's imprecise minimum and maximum heights, so the returned distance may be greater than what the distance to the bounding region would be if the heights were precise. When used for level-of-detail selection, this ensures that imprecise selection caused by the imprecise heights will cause too little detail to be loaded rather than too much detail. This is important because overestimating the required level-of-detail can require an excessive number of tiles to be loaded.
- Parameters
-
position | The position. |
ellipsoid | The ellipsoid on which this region is defined. |
- Returns
- The distance-squared from the position to the closest point in the bounding region.
◆ computeConservativeDistanceSquaredToPosition() [3/3]
double CesiumGeospatial::BoundingRegionWithLooseFittingHeights::computeConservativeDistanceSquaredToPosition |
( |
const glm::dvec3 & |
position, |
|
|
const Ellipsoid &ellipsoid |
CESIUM_DEFAULT_ELLIPSOID |
|
) |
| const |
|
noexcept |
Computes the conservative distance-squared from a position in ellipsoid-centered Cartesian coordinates to the closest point in this bounding region.
It is conservative in that the distance is computed using whichever is farther away of this bounding region's imprecise minimum and maximum heights, so the returned distance may be greater than what the distance to the bounding region would be if the heights were precise. When used for level-of-detail selection, this ensures that imprecise selection caused by the imprecise heights will cause too little detail to be loaded rather than too much detail. This is important because overestimating the required level-of-detail can require an excessive number of tiles to be loaded.
- Parameters
-
position | The position. |
ellipsoid | The ellipsoid on which this region is defined. |
- Returns
- The distance-squared from the position to the closest point in the bounding region.
The documentation for this class was generated from the following file: