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 <CesiumGltf/Library.h>
6#include <CesiumGltf/NamedObject.h>
7
8#include <cstdint>
9#include <optional>
10#include <string>
11
12namespace CesiumGltf {
16struct CESIUMGLTF_API BufferSpec : public CesiumGltf::NamedObject {
20 static constexpr const char* TypeName = "Buffer";
21
28 std::optional<std::string> uri;
29
33 int64_t byteLength = int64_t();
34
41 int64_t getSizeBytes() const {
42 int64_t accum = 0;
43 accum += int64_t(sizeof(BufferSpec));
45 int64_t(sizeof(CesiumGltf::NamedObject));
46 if (this->uri) {
47 accum += int64_t(this->uri->capacity() * sizeof(char));
48 }
49 return accum;
50 }
51
52protected:
56 BufferSpec() = default;
57 friend struct Buffer;
58};
59} // namespace CesiumGltf
Classes for working with glTF models.
A buffer points to binary geometry, animation, or skins.
Definition BufferSpec.h:16
std::optional< std::string > uri
The URI (or IRI) of the buffer.
Definition BufferSpec.h:28
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition BufferSpec.h:41
BufferSpec()=default
This class is not meant to be instantiated directly. Use Buffer instead.
This class is not meant to be instantiated directly. Use Buffer instead.
Definition Buffer.h:9
The base class for objects in a glTF that have a name.
Definition NamedObject.h:15
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition NamedObject.h:29