52 lines
1.5 KiB
C
52 lines
1.5 KiB
C
|
|
// This file was generated by generate-classes.
|
||
|
|
// DO NOT EDIT THIS FILE!
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <Cesium3DTiles/Library.h>
|
||
|
|
#include <CesiumUtility/ExtensibleObject.h>
|
||
|
|
|
||
|
|
#include <optional>
|
||
|
|
#include <string>
|
||
|
|
|
||
|
|
namespace Cesium3DTiles {
|
||
|
|
/**
|
||
|
|
* @brief Metadata about the entire tileset.
|
||
|
|
*/
|
||
|
|
struct CESIUM3DTILES_API Asset final : public CesiumUtility::ExtensibleObject {
|
||
|
|
/**
|
||
|
|
* @brief The original name of this type.
|
||
|
|
*/
|
||
|
|
static constexpr const char* TypeName = "Asset";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief The 3D Tiles version. The version defines the JSON schema for the
|
||
|
|
* tileset JSON and the base set of tile formats.
|
||
|
|
*/
|
||
|
|
std::string version;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief Application-specific version of this tileset, e.g., for when an
|
||
|
|
* existing tileset is updated.
|
||
|
|
*/
|
||
|
|
std::optional<std::string> tilesetVersion;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief Calculates the size in bytes of this object, including the contents
|
||
|
|
* of all collections, pointers, and strings. This will NOT include the size
|
||
|
|
* of any extensions attached to the object. Calling this method may be slow
|
||
|
|
* as it requires traversing the object's entire structure.
|
||
|
|
*/
|
||
|
|
int64_t getSizeBytes() const {
|
||
|
|
int64_t accum = 0;
|
||
|
|
accum += int64_t(sizeof(Asset));
|
||
|
|
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
|
||
|
|
int64_t(sizeof(CesiumUtility::ExtensibleObject));
|
||
|
|
accum += int64_t(this->version.capacity() * sizeof(char));
|
||
|
|
if (this->tilesetVersion) {
|
||
|
|
accum += int64_t(this->tilesetVersion->capacity() * sizeof(char));
|
||
|
|
}
|
||
|
|
return accum;
|
||
|
|
}
|
||
|
|
};
|
||
|
|
} // namespace Cesium3DTiles
|