Definition at line 16 of file QuadtreeAvailability.h.
◆ QuadtreeAvailability()
CesiumGeometry::QuadtreeAvailability::QuadtreeAvailability |
( |
uint32_t |
subtreeLevels, |
|
|
uint32_t |
maximumLevel |
|
) |
| |
|
noexcept |
Constructs a new instance.
- Parameters
-
subtreeLevels | The number of levels in each subtree. |
maximumLevel | The index of the maximum level in this tileset. |
◆ addLoadedSubtree()
Attempts to add a loaded subtree onto the given node.
The node must have been created earlier from a call to addNode.
- Parameters
-
pNode | The node on which to add the subtree. |
newSubtree | The new subtree to add. |
- Returns
- Whether the insertion was successful.
◆ addNode()
Attempts to add a child subtree node onto the given parent node.
Priming with a known parent subtree node avoids the need to traverse the entire availability tree so far. If the parent node is nullptr and the tile ID indicates this is the root tile, the subtree will be attached to the root.
- Parameters
-
tileID | The root tile's ID of the subtree we are trying to add. |
pParentNode | The parent subtree node. The tileID should fall exactly at the end of this parent subtree. |
- Returns
- The newly created node if the insertion was successful, nullptr otherwise.
◆ addSubtree()
Attempts to add an availability subtree into the existing overall availability tree.
- Parameters
-
- Returns
- Whether the insertion was successful.
◆ computeAvailability() [1/2]
uint8_t CesiumGeometry::QuadtreeAvailability::computeAvailability |
( |
const QuadtreeTileID & |
tileID | ) |
const |
|
noexcept |
Determines the currently known availability status of the given tile.
- Parameters
-
- Returns
- The TileAvailabilityFlags for this tile encoded into a uint8_t.
◆ computeAvailability() [2/2]
Determines the currently known availability status of the given tile.
Priming with a known parent subtree node avoids the need to traverse the entire availability tree so far. The node must have a loaded subtree
- Parameters
-
tileID | The tile ID to get the availability for. |
pNode | The subtree node to look for the tileID in. The tileID should be within this subtree node. |
- Returns
- The TileAvailabilityFlags for this tile encoded into a uint8_t.
◆ findChildNode()
Find the child node corresponding to this tile ID and parent node.
Attempts to find the child node for the tile with the given ID and parent node. The parent node is used to speed up the search significantly. Note that if the given tile ID does not correspond exactly to an immediate child node of the parent node, nullptr will be returned. If a tileID outside the given parent node's subtree is given, an incorrect child index may be returned.
- Parameters
-
tileID | The tile ID of the child node we are looking for. |
pParentNode | The immediate parent to the child node we are looking for. |
- Returns
- The child node if found, nullptr otherwise.
◆ findChildNodeIndex()
std::optional<uint32_t> CesiumGeometry::QuadtreeAvailability::findChildNodeIndex |
( |
const QuadtreeTileID & |
tileID, |
|
|
const AvailabilityNode * |
pParentNode |
|
) |
| const |
Find the child node index corresponding to this tile ID and parent node.
Attempts to find the child node for the tile with the given ID and parent node. The parent node is used to speed up the search significantly. Note that if the given tile ID does not correspond exactly to an immediate child node of the parent node, nullptr will be returned. If a tileID outside the given parent node's subtree is given, an incorrect child index may be returned.
- Parameters
-
tileID | The tile ID of the child node we are looking for. |
pParentNode | The immediate parent to the child node we are looking for. |
- Returns
- The child node index if found, std::nullopt otherwise.
The documentation for this class was generated from the following file: