5#include <CesiumGltf/Library.h>
6#include <CesiumUtility/ExtensibleObject.h>
10#include <unordered_map>
22 static constexpr const char* TypeName =
"MeshPrimitive";
29 static constexpr int32_t POINTS = 0;
32 static constexpr int32_t LINES = 1;
35 static constexpr int32_t LINE_LOOP = 2;
38 static constexpr int32_t LINE_STRIP = 3;
41 static constexpr int32_t TRIANGLES = 4;
44 static constexpr int32_t TRIANGLE_STRIP = 5;
47 static constexpr int32_t TRIANGLE_FAN = 6;
69 int32_t material = -1;
77 int32_t mode = Mode::TRIANGLES;
82 std::vector<std::unordered_map<std::string, int32_t>>
targets;
96 this->attributes.bucket_count() *
97 (
sizeof(std::string) +
sizeof(int32_t)));
98 for (
const auto& [k, v] : this->attributes) {
99 accum += int64_t(k.capacity() *
sizeof(
char) -
sizeof(std::string));
100 accum += int64_t(
sizeof(int32_t));
103 sizeof(std::unordered_map<std::string, int32_t>) *
104 this->targets.capacity());
Classes for working with glTF models.
Known values for The topology type of primitives to render.
Geometry to be rendered with the given material.
std::vector< std::unordered_map< std::string, int32_t > > targets
An array of morph targets.
std::unordered_map< std::string, int32_t > attributes
A plain JSON object, where each key corresponds to a mesh attribute semantic and each value is the in...
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 ...