cesium-native 0.43.0
Loading...
Searching...
No Matches
ExtensionExtMeshGpuInstancing.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 ExtensionExtMeshGpuInstancing final
21 static constexpr const char* TypeName = "ExtensionExtMeshGpuInstancing";
24 static constexpr const char* ExtensionName = "EXT_mesh_gpu_instancing";
25
37 std::unordered_map<std::string, int32_t> attributes;
38
45 int64_t getSizeBytes() const {
46 int64_t accum = 0;
47 accum += int64_t(sizeof(ExtensionExtMeshGpuInstancing));
49 int64_t(sizeof(CesiumUtility::ExtensibleObject));
50 accum += int64_t(
51 this->attributes.bucket_count() *
52 (sizeof(std::string) + sizeof(int32_t)));
53 for (const auto& [k, v] : this->attributes) {
54 accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
55 accum += int64_t(sizeof(int32_t));
56 }
57 return accum;
58 }
59};
60} // namespace CesiumGltf
Classes for working with glTF models.
glTF extension defines instance attributes for a node with a mesh.
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 instance attribute and each value is the index of ...
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 ...