MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / tileToRectangle

Method tileToRectangle

CesiumGeometry/src/QuadtreeTilingScheme.cpp:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64CesiumGeometry::Rectangle QuadtreeTilingScheme::tileToRectangle(
65 const CesiumGeometry::QuadtreeTileID& tileID) const noexcept {
66 const uint32_t xTiles = this->getNumberOfXTilesAtLevel(tileID.level);
67 const uint32_t yTiles = this->getNumberOfYTilesAtLevel(tileID.level);
68
69 const double xTileWidth = this->_rectangle.computeWidth() / xTiles;
70 const double left = this->_rectangle.minimumX + tileID.x * xTileWidth;
71 const double right = this->_rectangle.minimumX + (tileID.x + 1) * xTileWidth;
72
73 const double yTileHeight = this->_rectangle.computeHeight() / yTiles;
74 const double bottom = this->_rectangle.minimumY + tileID.y * yTileHeight;
75 const double top = this->_rectangle.minimumY + (tileID.y + 1) * yTileHeight;
76
77 return Rectangle(left, bottom, right, top);
78}
79
80} // namespace CesiumGeometry

Calls 3

RectangleFunction · 0.50

Tested by 1

loadQuadtreeTileImageMethod · 0.64