cesium-native 0.43.0
Loading...
Searching...
No Matches
ExtensionKhrDracoMeshCompression.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 <CesiumUtility/ExtensibleObject.h>
7
8#include <cstdint>
9#include <string>
10#include <unordered_map>
11
12namespace CesiumGltf {
16struct CESIUMGLTF_API ExtensionKhrDracoMeshCompression final
21 static constexpr const char* TypeName = "ExtensionKhrDracoMeshCompression";
24 static constexpr const char* ExtensionName = "KHR_draco_mesh_compression";
25
29 int32_t bufferView = -1;
30
35 std::unordered_map<std::string, int32_t> attributes;
36
43 int64_t getSizeBytes() const {
44 int64_t accum = 0;
45 accum += int64_t(sizeof(ExtensionKhrDracoMeshCompression));
47 int64_t(sizeof(CesiumUtility::ExtensibleObject));
48 accum += int64_t(
49 this->attributes.bucket_count() *
50 (sizeof(std::string) + sizeof(int32_t)));
51 for (const auto& [k, v] : this->attributes) {
52 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
53 accum += int64_t(sizeof(int32_t));
54 }
55 return accum;
56 }
57};
58} // namespace CesiumGltf
Classes for working with glTF models.
KHR_draco_mesh_compression glTF Mesh Primitive Extension.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
std::unordered_map< std::string, int32_t > attributes
A dictionary object, where each key corresponds to an attribute and its unique attribute id stored in...
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 ...