16 namespace AvailabilityUtilities {
17 uint8_t countOnesInByte(uint8_t _byte);
18 uint32_t countOnesInBuffer(gsl::span<const std::byte> buffer);
31 typedef std::variant<ConstantAvailability, SubtreeBufferView> AvailabilityView;
34 AvailabilityView tileAvailability;
35 AvailabilityView contentAvailability;
36 AvailabilityView subtreeAvailability;
37 std::vector<std::vector<std::byte>> buffers;
51 std::optional<AvailabilitySubtree>
subtree;
56 std::vector<std::unique_ptr<AvailabilityNode>>
childNodes;
70 void setLoadedSubtree(
72 uint32_t maxChildrenSubtrees) noexcept;
76 std::unique_ptr<AvailabilityNode> pRoot;
82 const AvailabilityView& view,
85 bool isBufferView()
const noexcept {
86 return pBufferView !=
nullptr && bufferAccessor;
89 bool isConstant()
const noexcept {
return pConstant !=
nullptr; }
100 return *bufferAccessor;
107 return bufferAccessor.value()[i];
113 size_t size()
const {
return pBufferView->byteLength; }
118 std::optional<gsl::span<const std::byte>> bufferAccessor;
const gsl::span< const std::byte > & getBufferAccessor() const
Unsafe is isBufferView is false.
size_t size() const
Unsafe if isBufferView is false;.
const std::byte & operator[](size_t i) const
Unsafe if isBufferView is false.
bool getConstant() const
Unsafe if isConstant is false.
Basic geometry classes for Cesium.
Availability nodes wrap subtree objects and link them together to form a downwardly traversable avail...
AvailabilityNode() noexcept
Creates an empty instance;.
std::optional< AvailabilitySubtree > subtree
The subtree data for this node.
std::vector< std::unique_ptr< AvailabilityNode > > childNodes
The child nodes for this subtree node.