cesium-native
0.41.0
|
Defines how a rectangular region is divided into quadtree tiles. More...
#include <CesiumGeometry/QuadtreeTilingScheme.h>
Public Member Functions | |
QuadtreeTilingScheme (const CesiumGeometry::Rectangle &rectangle, uint32_t rootTilesX, uint32_t rootTilesY) noexcept | |
Constructs a new instance. More... | |
const CesiumGeometry::Rectangle & | getRectangle () const noexcept |
Return the overall rectangle that is tiled. More... | |
uint32_t | getRootTilesX () const noexcept |
Returns the number of root tiles, in x-direction. | |
uint32_t | getRootTilesY () const noexcept |
Returns the number of root tiles, in y-direction. | |
uint32_t | getNumberOfXTilesAtLevel (uint32_t level) const noexcept |
Returns the number of tiles, in x-direction, at the given level. | |
uint32_t | getNumberOfYTilesAtLevel (uint32_t level) const noexcept |
Returns the number of tiles, in y-direction, at the given level. | |
std::optional< CesiumGeometry::QuadtreeTileID > | positionToTile (const glm::dvec2 &position, uint32_t level) const noexcept |
Computes the CesiumGeometry::QuadtreeTileID for a given position and level. More... | |
CesiumGeometry::Rectangle | tileToRectangle (const CesiumGeometry::QuadtreeTileID &tileID) const noexcept |
Returns the CesiumGeometry::Rectangle that is covered by the specified tile. More... | |
Defines how a rectangular region is divided into quadtree tiles.
Definition at line 16 of file QuadtreeTilingScheme.h.
|
noexcept |
Constructs a new instance.
rectangle | The overall rectangle that is tiled, expressed in projected coordinates. |
rootTilesX | The number of tiles at the root of the quadtree in the X direction. |
rootTilesY | The number of tiles at the root of the quadtree in the Y direction. |
|
inlinenoexcept |
Return the overall rectangle that is tiled.
The rectangle is expressed in projected coordinates.
Definition at line 38 of file QuadtreeTilingScheme.h.
|
noexcept |
Computes the CesiumGeometry::QuadtreeTileID for a given position and level.
If the given position is within the getRectangle of this tiling scheme, then this will compute the quadtree tile ID for the tile that contains the given position at the given level. Otherwise, nullopt
is returned.
position | The 2D position |
level | The level |
nullopt
.
|
noexcept |
Returns the CesiumGeometry::Rectangle that is covered by the specified tile.
The rectangle that is covered by the tile that is identified with the given CesiumGeometry::QuadtreeTileID will be computed, based on the getRectangle of this tiling scheme.
tileID | The tile ID |