cesium-native 0.43.0
Loading...
Searching...
No Matches
PropertyTexture.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/PropertyTextureProperty.h>
7#include <CesiumUtility/ExtensibleObject.h>
8
9#include <optional>
10#include <string>
11#include <unordered_map>
12
13namespace CesiumGltf {
18struct CESIUMGLTF_API PropertyTexture final
23 static constexpr const char* TypeName = "PropertyTexture";
24
28 std::optional<std::string> name;
29
34 std::string classProperty;
35
42 std::unordered_map<std::string, CesiumGltf::PropertyTextureProperty>
44
51 int64_t getSizeBytes() const {
52 int64_t accum = 0;
53 accum += int64_t(sizeof(PropertyTexture));
55 int64_t(sizeof(CesiumUtility::ExtensibleObject));
56 if (this->name) {
57 accum += int64_t(this->name->capacity() * sizeof(char));
58 }
59 accum += int64_t(this->classProperty.capacity() * sizeof(char));
60 accum += int64_t(
61 this->properties.bucket_count() *
62 (sizeof(std::string) + sizeof(CesiumGltf::PropertyTextureProperty)));
63 for (const auto& [k, v] : this->properties) {
64 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
65 accum += v.getSizeBytes() -
67 }
68 return accum;
69 }
70};
71} // namespace CesiumGltf
Classes for working with glTF models.
A texture containing property values.
Properties conforming to a class, organized as property values stored in textures.
std::optional< std::string > name
The name of the property texture, e.g. for display purposes.
std::string classProperty
The class that property values conform to. The value must be a class ID declared in the classes dicti...
std::unordered_map< std::string, CesiumGltf::PropertyTextureProperty > properties
A dictionary, where each key corresponds to a property ID in the class' properties dictionary and eac...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
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 ...