4 #include "QuadtreeTileRectangularRange.h"
5 #include "QuadtreeTilingScheme.h"
8 #include <glm/vec2.hpp>
29 uint32_t maximumLevel) noexcept;
68 struct RectangleWithLevel {
77 QuadtreeNode* pParent_) noexcept
91 QuadtreeNode* pParent;
92 std::unique_ptr<QuadtreeNode> ll;
93 std::unique_ptr<QuadtreeNode> lr;
94 std::unique_ptr<QuadtreeNode> ul;
95 std::unique_ptr<QuadtreeNode> ur;
97 std::vector<RectangleWithLevel> rectangles;
100 QuadtreeTilingScheme _tilingScheme;
101 uint32_t _maximumLevel;
102 std::vector<std::unique_ptr<QuadtreeNode>> _rootNodes;
104 static void putRectangleInQuadtree(
105 const QuadtreeTilingScheme& tilingScheme,
106 uint32_t maximumLevel,
107 QuadtreeRectangleAvailability::QuadtreeNode& node,
108 const QuadtreeRectangleAvailability::RectangleWithLevel&
110 static bool rectangleLevelComparator(
111 const QuadtreeRectangleAvailability::RectangleWithLevel& a,
112 const QuadtreeRectangleAvailability::RectangleWithLevel& b) noexcept;
113 static uint32_t findMaxLevelFromNode(
114 QuadtreeNode* pStopNode,
116 const glm::dvec2& position) noexcept;
117 static void createNodeChildrenIfNecessary(
119 const QuadtreeTilingScheme& tilingScheme) noexcept;
Manages information about the availability of tiles in a quadtree.
void addAvailableTileRange(const QuadtreeTileRectangularRange &range) noexcept
Adds the specified range to the set of available tiles.
uint32_t computeMaximumLevelAtPosition(const glm::dvec2 &position) const noexcept
Computes the maximum level for the given 2D position.
QuadtreeRectangleAvailability(const QuadtreeTilingScheme &tilingScheme, uint32_t maximumLevel) noexcept
Creates a new instance.
uint8_t isTileAvailable(const QuadtreeTileID &id) const noexcept
Returns whether a certain tile is available.
Defines how a rectangular region is divided into quadtree tiles.
Basic geometry classes for Cesium.
Uniquely identifies a node in a quadtree.
A rectangular range of tiles at a particular level of a quadtree.