cesium-native  0.41.0
CesiumGeometry::QuadtreeRectangleAvailability Class Referencefinal

Manages information about the availability of tiles in a quadtree. More...

#include <CesiumGeometry/QuadtreeRectangleAvailability.h>

Public Member Functions

 QuadtreeRectangleAvailability (const QuadtreeTilingScheme &tilingScheme, uint32_t maximumLevel) noexcept
 Creates a new instance. More...
 
void addAvailableTileRange (const QuadtreeTileRectangularRange &range) noexcept
 Adds the specified range to the set of available tiles. More...
 
uint32_t computeMaximumLevelAtPosition (const glm::dvec2 &position) const noexcept
 Computes the maximum level for the given 2D position. More...
 
uint8_t isTileAvailable (const QuadtreeTileID &id) const noexcept
 Returns whether a certain tile is available. More...
 

Detailed Description

Manages information about the availability of tiles in a quadtree.

Definition at line 18 of file QuadtreeRectangleAvailability.h.

Constructor & Destructor Documentation

◆ QuadtreeRectangleAvailability()

CesiumGeometry::QuadtreeRectangleAvailability::QuadtreeRectangleAvailability ( const QuadtreeTilingScheme tilingScheme,
uint32_t  maximumLevel 
)
noexcept

Creates a new instance.

Parameters
tilingSchemeThe QuadtreeTilingScheme.
maximumLevelThe maximum level (height of the tree) for which the availability should be tracked.

Member Function Documentation

◆ addAvailableTileRange()

void CesiumGeometry::QuadtreeRectangleAvailability::addAvailableTileRange ( const QuadtreeTileRectangularRange range)
noexcept

Adds the specified range to the set of available tiles.

Parameters
rangeThe QuadtreeTileRectangularRange that describes the range of available tiles.

◆ computeMaximumLevelAtPosition()

uint32_t CesiumGeometry::QuadtreeRectangleAvailability::computeMaximumLevelAtPosition ( const glm::dvec2 &  position) const
noexcept

Computes the maximum level for the given 2D position.

This will compute the maximum level of any available tile for the given position. The position refers to the 2D space that is covered by the nodes of the quadtree.

Parameters
positionThe 2D position.
Returns
The maximum level at the given position. This may be 0 if the position is not covered by the quadtree at all.

◆ isTileAvailable()

uint8_t CesiumGeometry::QuadtreeRectangleAvailability::isTileAvailable ( const QuadtreeTileID id) const
noexcept

Returns whether a certain tile is available.

This checks the availability of the tile that is described by the given QuadtreeTileID, which consists of the level and the x- and y- coordinates of the queried tile.

Parameters
idThe quadtree tile ID.
Returns
The CesiumGeometry::TileAvailabilityFlags for this tile, encoded into an uint8_t.

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