cesium-native 0.43.0
Loading...
Searching...
No Matches
OctreeTileID.h
1#pragma once
2
3#include "Library.h"
4
5#include <cstdint>
6
7namespace CesiumGeometry {
8
18struct CESIUMGEOMETRY_API OctreeTileID {
19
23 constexpr OctreeTileID() : level(0), x(0), y(0), z(0){};
24
33 constexpr OctreeTileID(
34 uint32_t level_,
35 uint32_t x_,
36 uint32_t y_,
37 uint32_t z_) noexcept
38 : level(level_), x(x_), y(y_), z(z_) {}
39
43 constexpr bool operator==(const OctreeTileID& other) const noexcept {
44 return this->level == other.level && this->x == other.x &&
45 this->y == other.y && this->z == other.z;
46 }
47
51 constexpr bool operator!=(const OctreeTileID& other) const noexcept {
52 return !(*this == other);
53 }
54
58 uint32_t level;
59
63 uint32_t x;
64
68 uint32_t y;
69
73 uint32_t z;
74};
75
76} // namespace CesiumGeometry
Basic geometry classes for Cesium.
A structure serving as a unique identifier for a node in an octree.
uint32_t x
The x-coordinate of this tile ID.
constexpr OctreeTileID(uint32_t level_, uint32_t x_, uint32_t y_, uint32_t z_) noexcept
Creates a new instance.
uint32_t level
The level of this tile ID, with 0 being the root tile.
uint32_t z
The z-coordinate of this tile ID.
constexpr OctreeTileID()
Creates a new instance.
uint32_t y
The y-coordinate of this tile ID.
constexpr bool operator!=(const OctreeTileID &other) const noexcept
Returns true if two identifiers are not equal.
constexpr bool operator==(const OctreeTileID &other) const noexcept
Returns true if two identifiers are equal.