cesium-native 0.66.0
Loading...
Searching...
No Matches
File.h
1// This file was generated by generate-classes.
2// DO NOT EDIT THIS FILE!
3#pragma once
4
5#include <CesiumGltf/Alias.h>
6#include <CesiumGltf/Library.h>
7#include <CesiumGltf/NamedObject.h>
8
9#include <cstdint>
10#include <optional>
11#include <string>
12#include <vector>
13
14namespace CesiumGltf {
19struct CESIUMGLTF_API File final : public CesiumGltf::NamedObject {
23 static constexpr const char* TypeName = "File";
24
28 struct MimeType {
30 inline static const std::string model_gltf_json = "model/gltf+json";
31
33 inline static const std::string model_gltf_binary = "model/gltf-binary";
34 };
35
40 std::vector<CesiumGltf::Alias> aliases;
41
47 int32_t bufferView = -1;
48
58
66 std::optional<std::string> uri;
67
74 int64_t getSizeBytes() const {
75 int64_t accum = 0;
76 accum += int64_t(sizeof(File));
78 int64_t(sizeof(CesiumGltf::NamedObject));
79 accum += int64_t(sizeof(CesiumGltf::Alias) * this->aliases.capacity());
80 for (const CesiumGltf::Alias& value : this->aliases) {
81 accum += value.getSizeBytes() - int64_t(sizeof(CesiumGltf::Alias));
82 }
83 if (this->uri) {
84 accum += int64_t(this->uri->capacity() * sizeof(char));
85 }
86 return accum;
87 }
88};
89} // namespace CesiumGltf
Classes for working with glTF models.
Used to alias files referenced within an external file to other paths by the parent.
Definition Alias.h:16
Known values for The media type or MIME type of the external file.
Definition File.h:28
static const std::string model_gltf_json
model/gltf+json
Definition File.h:30
static const std::string model_gltf_binary
model/gltf-binary
Definition File.h:33
A reference to an external file. Files MAY be referenced by a URI (or IRI) or a buffer view index.
Definition File.h:19
std::optional< std::string > uri
The URI (or IRI) of the external file.
Definition File.h:66
std::string mimeType
The media type or MIME type of the external file.
Definition File.h:57
int32_t bufferView
The index of the bufferView that contains the file data.
Definition File.h:47
static constexpr const char * TypeName
The original name of this type.
Definition File.h:23
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Definition File.h:74
std::vector< CesiumGltf::Alias > aliases
An array of aliases used for files within this external file. Aliases allow overriding inner file URI...
Definition File.h:40
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