cesium-native 0.66.0
Loading...
Searching...
No Matches
ExtensionModelExtStructuralMetadata.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/PropertyAttribute.h>
7#include <CesiumGltf/PropertyTable.h>
8#include <CesiumGltf/PropertyTexture.h>
9#include <CesiumGltf/Schema.h>
10#include <CesiumGltf/Statistics.h>
11#include <CesiumUtility/ExtensibleObject.h>
12#include <CesiumUtility/IntrusivePointer.h>
13
14#include <optional>
15#include <string>
16#include <vector>
17
18namespace CesiumGltf {
23struct CESIUMGLTF_API ExtensionModelExtStructuralMetadata final
28 static constexpr const char* TypeName = "ExtensionModelExtStructuralMetadata";
31 static constexpr const char* ExtensionName = "EXT_structural_metadata";
32
37
41 std::optional<std::string> schemaUri;
42
47 std::vector<CesiumGltf::PropertyTable> propertyTables;
48
53 std::vector<CesiumGltf::PropertyTexture> propertyTextures;
54
59 std::vector<CesiumGltf::PropertyAttribute> propertyAttributes;
60
64 std::optional<CesiumGltf::Statistics> statistics;
65
72 int64_t getSizeBytes() const {
73 int64_t accum = 0;
74 accum += int64_t(sizeof(ExtensionModelExtStructuralMetadata));
76 int64_t(sizeof(CesiumUtility::ExtensibleObject));
77 accum += this->schema->getSizeBytes();
78 if (this->schemaUri) {
79 accum += int64_t(this->schemaUri->capacity() * sizeof(char));
80 }
81 accum += int64_t(
82 sizeof(CesiumGltf::PropertyTable) * this->propertyTables.capacity());
83 for (const CesiumGltf::PropertyTable& value : this->propertyTables) {
84 accum +=
85 value.getSizeBytes() - int64_t(sizeof(CesiumGltf::PropertyTable));
86 }
87 accum += int64_t(
89 this->propertyTextures.capacity());
90 for (const CesiumGltf::PropertyTexture& value : this->propertyTextures) {
91 accum +=
92 value.getSizeBytes() - int64_t(sizeof(CesiumGltf::PropertyTexture));
93 }
94 accum += int64_t(
96 this->propertyAttributes.capacity());
97 for (const CesiumGltf::PropertyAttribute& value :
98 this->propertyAttributes) {
99 accum +=
100 value.getSizeBytes() - int64_t(sizeof(CesiumGltf::PropertyAttribute));
101 }
102 if (this->statistics) {
103 accum += this->statistics->getSizeBytes() -
104 int64_t(sizeof(CesiumGltf::Statistics));
105 }
106 return accum;
107 }
108};
109} // namespace CesiumGltf
A smart pointer that calls addReference and releaseReference on the controlled object.
Classes for working with glTF models.
glTF extension that provides structural metadata about vertices, texels, and features in a glTF asset...
CesiumUtility::IntrusivePointer< CesiumGltf::Schema > schema
An object defining classes and enums.
std::vector< CesiumGltf::PropertyAttribute > propertyAttributes
An array of property attribute definitions, which may be referenced by index.
std::optional< std::string > schemaUri
The URI (or IRI) of the external schema file.
std::optional< CesiumGltf::Statistics > statistics
An object containing statistics about metadata entities.
static constexpr const char * TypeName
The original name of this type.
std::vector< CesiumGltf::PropertyTable > propertyTables
An array of property table definitions, which may be referenced by index.
static constexpr const char * ExtensionName
The official name of the extension. This should be the same as its key in the extensions object.
std::vector< CesiumGltf::PropertyTexture > propertyTextures
An array of property texture definitions, which may be referenced by index.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
Properties conforming to a class, organized as property values stored in attributes.
Properties conforming to a class, organized as property values stored in binary columnar arrays.
Properties conforming to a class, organized as property values stored in textures.
Statistics about entities.
Definition Statistics.h:17
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 ...