cesium-native  0.41.0
CesiumGeospatial::BoundingRegionBuilder Class Reference

Public Member Functions

 BoundingRegionBuilder () noexcept
 Constructs a new instance, starting with an empty bounding region.
 
BoundingRegion toRegion (const Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID) const
 Gets the final region from this builder. More...
 
GlobeRectangle toGlobeRectangle () const
 Gets the final globe rectangle from this builder. More...
 
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. More...
 
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. More...
 
bool expandToIncludePosition (const Cartographic &position)
 Expands the bounding region to include the given position. More...
 

Detailed Description

Definition at line 9 of file BoundingRegionBuilder.h.

Member Function Documentation

◆ expandToIncludePosition()

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.

Parameters
positionThe position to be included in the region.
Returns
True if the region was modified, or false if the region already contained the position.

◆ getPoleTolerance()

double CesiumGeospatial::BoundingRegionBuilder::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.

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.

Returns
The tolerance.

◆ setPoleTolerance()

void CesiumGeospatial::BoundingRegionBuilder::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.

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.

Parameters
toleranceThe new tolerance.

◆ toGlobeRectangle()

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.

◆ toRegion()

BoundingRegion CesiumGeospatial::BoundingRegionBuilder::toRegion ( const Ellipsoid &ellipsoid  CESIUM_DEFAULT_ELLIPSOID) 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).


The documentation for this class was generated from the following file: