cesium-native 0.66.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
29 int32_t chunk = -1;
30
37 std::optional<std::string> uri;
38
42 int64_t byteLength = int64_t();
43
50 int64_t getSizeBytes() const {
51 int64_t accum = 0;
52 accum += int64_t(sizeof(BufferSpec));
54 int64_t(sizeof(CesiumGltf::NamedObject));
55 if (this->uri) {
56 accum += int64_t(this->uri->capacity() * sizeof(char));
57 }
58 return accum;
59 }
60
61protected:
66 BufferSpec() = default;
67 friend struct Buffer;
68};
69} // namespace CesiumGltf
Classes for working with glTF models.
static constexpr const char * TypeName
The original name of this type.
Definition BufferSpec.h:20
std::optional< std::string > uri
The URI (or IRI) of the buffer.
Definition BufferSpec.h:37
int64_t byteLength
The length of the buffer in bytes.
Definition BufferSpec.h:42
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition BufferSpec.h:50
BufferSpec()=default
This class is not meant to be instantiated directly. Use Buffer instead.
int32_t chunk
The index of the chunk that contains the buffer data.
Definition BufferSpec.h:29
The base class for objects in a glTF that have a name.
Definition NamedObject.h:14
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition NamedObject.h:28