cesium-native 0.43.0
Loading...
Searching...
No Matches
LayerSpec.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumQuantizedMeshTerrain/AvailabilityRectangle.h>
6#include <CesiumQuantizedMeshTerrain/Library.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <cstdint>
10#include <optional>
11#include <string>
12#include <vector>
13
18struct CESIUMQUANTIZEDMESHTERRAIN_API LayerSpec
23 static constexpr const char* TypeName = "Layer";
24
28 std::string attribution;
29
36 std::vector<std::vector<CesiumQuantizedMeshTerrain::AvailabilityRectangle>>
38
43 std::vector<double> bounds = {-180, -90, 180, 90};
44
48 std::string description;
49
53 std::vector<std::string> extensionsProperty;
54
58 std::string format = "quantized-mesh-1.0";
59
63 int64_t maxzoom = int64_t();
64
68 int64_t minzoom = 0;
69
74 std::optional<int64_t> metadataAvailability;
75
79 std::string name = "Terrain";
80
84 std::optional<std::string> parentUrl;
85
90 std::string projection = "EPSG:4326";
91
95 std::string scheme = "tms";
96
100 std::vector<std::string> tiles;
101
105 std::string version = "1.0.0";
106
113 int64_t getSizeBytes() const {
114 int64_t accum = 0;
115 accum += int64_t(sizeof(LayerSpec));
117 int64_t(sizeof(CesiumUtility::ExtensibleObject));
118 accum += int64_t(this->attribution.capacity() * sizeof(char));
119 accum += int64_t(
120 sizeof(std::vector<CesiumQuantizedMeshTerrain::AvailabilityRectangle>) *
121 this->available.capacity());
122 for (const std::vector<CesiumQuantizedMeshTerrain::AvailabilityRectangle>&
123 valueOuter : this->available) {
124 accum += int64_t(
126 valueOuter.capacity());
128 valueOuter) {
129 accum +=
130 value.getSizeBytes() -
132 }
133 }
134 accum += int64_t(sizeof(double) * this->bounds.capacity());
135 accum += int64_t(this->description.capacity() * sizeof(char));
136 accum += int64_t(sizeof(std::string) * this->extensionsProperty.capacity());
137 accum += int64_t(this->format.capacity() * sizeof(char));
138 accum += int64_t(this->name.capacity() * sizeof(char));
139 if (this->parentUrl) {
140 accum += int64_t(this->parentUrl->capacity() * sizeof(char));
141 }
142 accum += int64_t(this->projection.capacity() * sizeof(char));
143 accum += int64_t(this->scheme.capacity() * sizeof(char));
144 accum += int64_t(sizeof(std::string) * this->tiles.capacity());
145 accum += int64_t(this->version.capacity() * sizeof(char));
146 return accum;
147 }
148
149protected:
153 LayerSpec() = default;
154 friend struct Layer;
155};
156} // namespace CesiumQuantizedMeshTerrain
Classes for accessing terrain based on layer.json and quantized-mesh-1.0.
Definition Layer.h:12
A quantized-mesh terrain layer.json.
Definition LayerSpec.h:19
std::optional< std::string > parentUrl
The URL of the parent layer.json that this one is layered on top of.
Definition LayerSpec.h:84
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition LayerSpec.h:113
std::vector< std::string > extensionsProperty
The extensions available for this tileset.
Definition LayerSpec.h:53
std::vector< std::string > tiles
The URL templates from which to obtain tiles.
Definition LayerSpec.h:100
std::vector< std::vector< CesiumQuantizedMeshTerrain::AvailabilityRectangle > > available
The tile availability information. The outer array is indexed by tile level. The inner array is a lis...
Definition LayerSpec.h:37
LayerSpec()=default
This class is not meant to be instantiated directly. Use Layer instead.
std::string description
The description of this terrain tileset.
Definition LayerSpec.h:48
std::optional< int64_t > metadataAvailability
The levels at metadata is found in tiles. For example, if this value is 10, then metadata is found at...
Definition LayerSpec.h:74
std::string attribution
The attribution (credit) string for the terrain.
Definition LayerSpec.h:28
A quantized-mesh terrain layer.json.
Definition Layer.h:17
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 ...