cesium-native 0.67.0
Loading...
Searching...
No Matches
BufferSpec.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumTilesetJson/Library.h>
6#include <CesiumUtility/ExtensibleObject.h>
7
8#include <cstdint>
9#include <optional>
10#include <string>
11
12namespace CesiumTilesetJson {
17struct CESIUMTILESETJSON_API BufferSpec
22 static constexpr const char* TypeName = "Buffer";
23
31 std::optional<std::string> uri;
32
36 int64_t byteLength = int64_t();
37
41 std::optional<std::string> name;
42
49 int64_t getSizeBytes() const {
50 int64_t accum = 0;
51 accum += int64_t(sizeof(BufferSpec));
53 int64_t(sizeof(CesiumUtility::ExtensibleObject));
54 if (this->uri) {
55 accum += int64_t(this->uri->capacity() * sizeof(char));
56 }
57 if (this->name) {
58 accum += int64_t(this->name->capacity() * sizeof(char));
59 }
60 return accum;
61 }
62
63protected:
68 BufferSpec() = default;
69 friend struct Buffer;
70};
71} // namespace CesiumTilesetJson
Classes to represent a tileset.json from 3D Tiles 1.1.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition BufferSpec.h:49
std::optional< std::string > name
The name of the buffer.
Definition BufferSpec.h:41
int64_t byteLength
The length of the buffer in bytes.
Definition BufferSpec.h:36
BufferSpec()=default
This class is not meant to be instantiated directly. Use Buffer instead.
std::optional< std::string > uri
The URI (or IRI) of the file that contains the binary buffer data. Relative paths are relative to the...
Definition BufferSpec.h:31
static constexpr const char * TypeName
The original name of this type.
Definition BufferSpec.h:22
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 ...