cesium-native  0.41.0
CesiumGeometry::QuadtreeTileID Struct Referencefinal

Uniquely identifies a node in a quadtree. More...

#include <CesiumGeometry/QuadtreeTileID.h>

Public Member Functions

constexpr QuadtreeTileID (uint32_t level_, uint32_t x_, uint32_t y_) noexcept
 Creates a new instance. More...
 
constexpr bool operator== (const QuadtreeTileID &other) const noexcept
 Returns true if two identifiers are equal.
 
constexpr bool operator!= (const QuadtreeTileID &other) const noexcept
 Returns true if two identifiers are not equal.
 
uint32_t computeInvertedY (const QuadtreeTilingScheme &tilingScheme) const noexcept
 Computes the inverse y-coordinate of this tile ID. More...
 
constexpr QuadtreeTileID getParent () const noexcept
 Gets the ID of the parent of the tile with this ID. More...
 

Public Attributes

uint32_t level
 The level of this tile ID, with 0 being the root tile.
 
uint32_t x
 The x-coordinate of this tile ID.
 
uint32_t y
 The y-coordinate of this tile ID.
 

Detailed Description

Uniquely identifies a node in a quadtree.

This is one form of a Cesium3DTilesSelection::TileID.

The identifier is composed of the level (with 0 being the level of the root tile), the x- and y-coordinate of the tile, referring to a grid coordinate system at the respective level.

Definition at line 20 of file QuadtreeTileID.h.

Constructor & Destructor Documentation

◆ QuadtreeTileID()

constexpr CesiumGeometry::QuadtreeTileID::QuadtreeTileID ( uint32_t  level_,
uint32_t  x_,
uint32_t  y_ 
)
inlineconstexprnoexcept

Creates a new instance.

Parameters
level_The level of the node, with 0 being the root
x_The x-coordinate of the tile
y_The y-coordinate of the tile

Definition at line 29 of file QuadtreeTileID.h.

Member Function Documentation

◆ computeInvertedY()

uint32_t CesiumGeometry::QuadtreeTileID::computeInvertedY ( const QuadtreeTilingScheme tilingScheme) const
noexcept

Computes the inverse y-coordinate of this tile ID.

This will compute the inverse y-coordinate of this tile ID, based on the given tiling scheme, which provides the number of tiles in y-direction for the level of this tile ID.

Parameters
tilingSchemeThe QuadtreeTilingScheme.
Returns
The inverted y-coordinate.

◆ getParent()

constexpr QuadtreeTileID CesiumGeometry::QuadtreeTileID::getParent ( ) const
inlineconstexprnoexcept

Gets the ID of the parent of the tile with this ID.

If this method is called on a level zero tile, it returns itself.

Returns
The ID of the parent tile.

Definition at line 67 of file QuadtreeTileID.h.


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