cesium-native 0.43.0
|
Helper class for creating a BoundingRegion or GlobeRectangle from a set of points. More...
#include <CesiumGeospatial/BoundingRegionBuilder.h>
Public Member Functions | |
BoundingRegionBuilder () noexcept | |
Constructs a new instance, starting with an empty bounding region. | |
BoundingRegion | toRegion (const Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84) const |
Gets the final region from this builder. | |
GlobeRectangle | toGlobeRectangle () const |
Gets the final globe rectangle from this builder. | |
void | setPoleTolerance (double tolerance) noexcept |
Sets the distance from the North or South pole, in radians, that is considered "too close" to rely on the longitude value. | |
double | getPoleTolerance () const noexcept |
Gets the distance from the North or South pole, in radians, that is considered "too close" to rely on the longitude value. | |
bool | expandToIncludePosition (const Cartographic &position) |
Expands the bounding region to include the given position. | |
Helper class for creating a BoundingRegion or GlobeRectangle from a set of points.
Definition at line 13 of file BoundingRegionBuilder.h.
bool CesiumGeospatial::BoundingRegionBuilder::expandToIncludePosition | ( | const Cartographic & | position | ) |
Expands the bounding region to include the given position.
The region will be kept as small as possible.
position | The position to be included in the region. |
|
noexcept |
Gets the distance from the North or South pole, in radians, that is considered "too close" to rely on the longitude value.
When a position given to expandToIncludePosition
has a latitude closer than this value, the region will be updated to include the position's latitude, but the position's longitude will be ignored.
|
noexcept |
Sets the distance from the North or South pole, in radians, that is considered "too close" to rely on the longitude value.
When a position given to expandToIncludePosition
has a latitude closer than this value, the region will be updated to include the position's latitude, but the position's longitude will be ignored.
tolerance | The new tolerance. |
GlobeRectangle CesiumGeospatial::BoundingRegionBuilder::toGlobeRectangle | ( | ) | const |
Gets the final globe rectangle from this builder.
If no positions are added to this builder, the returned region's rectangle will be GlobeRectangle::EMPTY
.
BoundingRegion CesiumGeospatial::BoundingRegionBuilder::toRegion | ( | const Ellipsoid & | ellipsoid = CesiumGeospatial::Ellipsoid::WGS84 | ) | const |
Gets the final region from this builder.
If no positions are added to this builder, the returned region's rectangle will be GlobeRectangle::EMPTY
, its minimum height will be 1.0, and its maximum height will be -1.0 (the minimum will be greater than the maximum).