cesium-native 0.43.0
Loading...
Searching...
No Matches
Tile.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <Cesium3DTiles/BoundingVolume.h>
6#include <Cesium3DTiles/Content.h>
7#include <Cesium3DTiles/ImplicitTiling.h>
8#include <Cesium3DTiles/Library.h>
9#include <Cesium3DTiles/MetadataEntity.h>
10#include <CesiumUtility/ExtensibleObject.h>
11
12#include <optional>
13#include <string>
14#include <vector>
15
16namespace Cesium3DTiles {
20struct CESIUM3DTILES_API Tile final : public CesiumUtility::ExtensibleObject {
24 static constexpr const char* TypeName = "Tile";
25
32 struct Refine {
34 inline static const std::string ADD = "ADD";
35
37 inline static const std::string REPLACE = "REPLACE";
38 };
39
44
50 std::optional<Cesium3DTiles::BoundingVolume> viewerRequestVolume;
51
57 double geometricError = double();
58
68 std::optional<std::string> refine;
69
81 std::vector<double> transform =
82 {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
83
89 std::optional<Cesium3DTiles::Content> content;
90
95 std::vector<Cesium3DTiles::Content> contents;
96
100 std::optional<Cesium3DTiles::MetadataEntity> metadata;
101
105 std::optional<Cesium3DTiles::ImplicitTiling> implicitTiling;
106
113 std::vector<Cesium3DTiles::Tile> children;
114
121 int64_t getSizeBytes() const {
122 int64_t accum = 0;
123 accum += int64_t(sizeof(Tile));
125 int64_t(sizeof(CesiumUtility::ExtensibleObject));
126 accum += this->boundingVolume.getSizeBytes() -
127 int64_t(sizeof(Cesium3DTiles::BoundingVolume));
128 if (this->viewerRequestVolume) {
129 accum += this->viewerRequestVolume->getSizeBytes() -
130 int64_t(sizeof(Cesium3DTiles::BoundingVolume));
131 }
132 accum += int64_t(sizeof(double) * this->transform.capacity());
133 if (this->content) {
134 accum += this->content->getSizeBytes() -
135 int64_t(sizeof(Cesium3DTiles::Content));
136 }
137 accum +=
138 int64_t(sizeof(Cesium3DTiles::Content) * this->contents.capacity());
139 for (const Cesium3DTiles::Content& value : this->contents) {
140 accum += value.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Content));
141 }
142 if (this->metadata) {
143 accum += this->metadata->getSizeBytes() -
144 int64_t(sizeof(Cesium3DTiles::MetadataEntity));
145 }
146 if (this->implicitTiling) {
147 accum += this->implicitTiling->getSizeBytes() -
148 int64_t(sizeof(Cesium3DTiles::ImplicitTiling));
149 }
150 accum += int64_t(sizeof(Cesium3DTiles::Tile) * this->children.capacity());
151 for (const Cesium3DTiles::Tile& value : this->children) {
152 accum += value.getSizeBytes() - int64_t(sizeof(Cesium3DTiles::Tile));
153 }
154 return accum;
155 }
156};
157} // namespace Cesium3DTiles
Classes for using 3D Tiles.
Definition Buffer.h:7
A bounding volume that encloses a tile or its content. At least one bounding volume property is requi...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Metadata about the tile's content and a link to the content.
Definition Content.h:19
This object allows a tile to be implicitly subdivided. Tile and content availability and metadata is ...
An object containing a reference to a class from a metadata schema, and property values that conform ...
Known values for Specifies if additive or replacement refinement is used when traversing the tileset ...
Definition Tile.h:32
A tile in a 3D Tiles tileset.
Definition Tile.h:20
std::optional< Cesium3DTiles::MetadataEntity > metadata
A metadata entity that is associated with this tile.
Definition Tile.h:100
std::vector< Cesium3DTiles::Content > contents
An array of contents. When this is defined, then content shall be undefined.
Definition Tile.h:95
std::optional< Cesium3DTiles::ImplicitTiling > implicitTiling
An object that describes the implicit subdivision of this tile.
Definition Tile.h:105
std::optional< std::string > refine
Specifies if additive or replacement refinement is used when traversing the tileset for rendering....
Definition Tile.h:68
std::optional< Cesium3DTiles::BoundingVolume > viewerRequestVolume
Optional bounding volume that defines the volume the viewer shall be inside of before the tile's cont...
Definition Tile.h:50
std::vector< Cesium3DTiles::Tile > children
An array of objects that define child tiles. Each child tile content is fully enclosed by its parent ...
Definition Tile.h:113
Cesium3DTiles::BoundingVolume boundingVolume
The bounding volume that encloses the tile.
Definition Tile.h:43
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition Tile.h:121
std::optional< Cesium3DTiles::Content > content
Metadata about the tile's content and a link to the content. When this is omitted the tile is just us...
Definition Tile.h:89
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 ...