5#include <CesiumGltf/Library.h>
6#include <CesiumGltf/Padding.h>
7#include <CesiumUtility/ExtensibleObject.h>
12#include <unordered_map>
25 static constexpr const char* TypeName =
"ExtensionExtPrimitiveVoxels";
28 static constexpr const char* ExtensionName =
"EXT_primitive_voxels";
45 std::optional<CesiumGltf::Padding>
padding;
53 std::unordered_map<std::string, std::vector<double>>
noData;
66 accum += int64_t(
sizeof(int64_t) * this->dimensions.capacity());
72 this->noData.bucket_count() *
73 (
sizeof(std::string) +
sizeof(std::vector<double>)));
74 for (
const auto& [k, v] : this->noData) {
75 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
76 accum += int64_t(
sizeof(
double) * v.capacity());
Classes for working with glTF models.
EXT_primitive_voxels extension for a primitive in a glTF model to indicate voxel-based volumetric dat...
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
std::optional< CesiumGltf::Padding > padding
The optional padding of the voxels.
std::vector< int64_t > dimensions
Dimensions of the voxel grid. The values are interpreted with respect to the shape indicated by KHR_i...
std::unordered_map< std::string, std::vector< double > > noData
A plain JSON object, where each key corresponds to an existing semantic in the primitive's attributes...
The padding around a voxel grid. Specifies how many rows of attribute data come from neighboring grid...
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 ...