cesium-native 0.43.0
Loading...
Searching...
No Matches
Subtree.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <Cesium3DTiles/Availability.h>
6#include <Cesium3DTiles/Buffer.h>
7#include <Cesium3DTiles/BufferView.h>
8#include <Cesium3DTiles/Library.h>
9#include <Cesium3DTiles/MetadataEntity.h>
10#include <Cesium3DTiles/PropertyTable.h>
11#include <CesiumUtility/ExtensibleObject.h>
12
13#include <cstdint>
14#include <optional>
15#include <vector>
16
17namespace Cesium3DTiles {
23struct CESIUM3DTILES_API Subtree final
28 static constexpr const char* TypeName = "Subtree";
29
33 std::vector<Cesium3DTiles::Buffer> buffers;
34
38 std::vector<Cesium3DTiles::BufferView> bufferViews;
39
43 std::vector<Cesium3DTiles::PropertyTable> propertyTables;
44
58
65 std::vector<Cesium3DTiles::Availability> contentAvailability;
66
80
87 std::optional<int64_t> tileMetadata;
88
98 std::vector<int64_t> contentMetadata;
99
103 std::optional<Cesium3DTiles::MetadataEntity> subtreeMetadata;
104
111 int64_t getSizeBytes() const {
112 int64_t accum = 0;
113 accum += int64_t(sizeof(Subtree));
115 int64_t(sizeof(CesiumUtility::ExtensibleObject));
116 accum += int64_t(sizeof(Cesium3DTiles::Buffer) * this->buffers.capacity());
117 for (const Cesium3DTiles::Buffer& value : this->buffers) {
118 accum += value.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Buffer));
119 }
120 accum += int64_t(
121 sizeof(Cesium3DTiles::BufferView) * this->bufferViews.capacity());
122 for (const Cesium3DTiles::BufferView& value : this->bufferViews) {
123 accum +=
124 value.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::BufferView));
125 }
126 accum += int64_t(
127 sizeof(Cesium3DTiles::PropertyTable) * this->propertyTables.capacity());
128 for (const Cesium3DTiles::PropertyTable& value : this->propertyTables) {
129 accum +=
130 value.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::PropertyTable));
131 }
132 accum += this->tileAvailability.getSizeBytes() -
133 int64_t(sizeof(Cesium3DTiles::Availability));
134 accum += int64_t(
136 this->contentAvailability.capacity());
137 for (const Cesium3DTiles::Availability& value : this->contentAvailability) {
138 accum +=
139 value.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Availability));
140 }
141 accum += this->childSubtreeAvailability.getSizeBytes() -
142 int64_t(sizeof(Cesium3DTiles::Availability));
143 accum += int64_t(sizeof(int64_t) * this->contentMetadata.capacity());
144 if (this->subtreeMetadata) {
145 accum += this->subtreeMetadata->getSizeBytes() -
146 int64_t(sizeof(Cesium3DTiles::MetadataEntity));
147 }
148 return accum;
149 }
150};
151} // namespace Cesium3DTiles
Classes for using 3D Tiles.
Definition Buffer.h:7
An object describing the availability of a set of elements.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
A contiguous subset of a buffer.
Definition BufferView.h:17
This class is not meant to be instantiated directly. Use Buffer instead.
Definition Buffer.h:9
An object containing a reference to a class from a metadata schema, and property values that conform ...
Properties conforming to a class, organized as property values stored in binary columnar arrays.
An object describing the availability of tiles and content in a subtree, as well as availability of c...
Definition Subtree.h:24
std::optional< Cesium3DTiles::MetadataEntity > subtreeMetadata
Subtree metadata encoded in JSON.
Definition Subtree.h:103
std::vector< Cesium3DTiles::PropertyTable > propertyTables
An array of property tables.
Definition Subtree.h:43
std::optional< int64_t > tileMetadata
Index of the property table containing tile metadata. Tile metadata only exists for available tiles a...
Definition Subtree.h:87
std::vector< Cesium3DTiles::BufferView > bufferViews
An array of buffer views.
Definition Subtree.h:38
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Subtree.h:111
std::vector< Cesium3DTiles::Buffer > buffers
An array of buffers.
Definition Subtree.h:33
Cesium3DTiles::Availability tileAvailability
The availability of tiles in the subtree. The availability bitstream is a 1D boolean array where tile...
Definition Subtree.h:57
Cesium3DTiles::Availability childSubtreeAvailability
The availability of children subtrees. The availability bitstream is a 1D boolean array where subtree...
Definition Subtree.h:79
std::vector< Cesium3DTiles::Availability > contentAvailability
An array of content availability objects. If the tile has a single content this array will have one e...
Definition Subtree.h:65
std::vector< int64_t > contentMetadata
An array of indexes to property tables containing content metadata. If the tile has a single content ...
Definition Subtree.h:98
The base class for objects that have extensions and extras.
int64_t getSizeBytes() const
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including ...