cesium-native 0.43.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 <Cesium3DTiles/Library.h>
6#include <CesiumUtility/ExtensibleObject.h>
7
8#include <cstdint>
9#include <optional>
10#include <string>
11
12namespace Cesium3DTiles {
17struct CESIUM3DTILES_API BufferSpec : public CesiumUtility::ExtensibleObject {
21 static constexpr const char* TypeName = "Buffer";
22
30 std::optional<std::string> uri;
31
35 int64_t byteLength = int64_t();
36
40 std::optional<std::string> name;
41
48 int64_t getSizeBytes() const {
49 int64_t accum = 0;
50 accum += int64_t(sizeof(BufferSpec));
52 int64_t(sizeof(CesiumUtility::ExtensibleObject));
53 if (this->uri) {
54 accum += int64_t(this->uri->capacity() * sizeof(char));
55 }
56 if (this->name) {
57 accum += int64_t(this->name->capacity() * sizeof(char));
58 }
59 return accum;
60 }
61
62protected:
66 BufferSpec() = default;
67 friend struct Buffer;
68};
69} // namespace Cesium3DTiles
Classes for using 3D Tiles.
Definition Buffer.h:7
A buffer is a binary blob. It is either the binary chunk of the subtree file, or an external buffer r...
Definition BufferSpec.h:17
BufferSpec()=default
This class is not meant to be instantiated directly. Use Buffer instead.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition BufferSpec.h:48
std::optional< std::string > name
The name of the buffer.
Definition BufferSpec.h:40
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:30
This class is not meant to be instantiated directly. Use Buffer instead.
Definition Buffer.h:9
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 ...