5#include <CesiumGltf/Library.h>
6#include <CesiumUtility/ExtensibleObject.h>
10#include <unordered_map>
22 static constexpr const char*
TypeName =
"MeshPrimitive";
32 static constexpr int32_t
LINES = 1;
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.
static constexpr int32_t LINE_LOOP
LINE_LOOP (2)
static constexpr int32_t TRIANGLES
TRIANGLES (4)
static constexpr int32_t LINES
LINES (1)
static constexpr int32_t LINE_STRIP
LINE_STRIP (3)
static constexpr int32_t POINTS
POINTS (0)
static constexpr int32_t TRIANGLE_FAN
TRIANGLE_FAN (6)
static constexpr int32_t TRIANGLE_STRIP
TRIANGLE_STRIP (5)
Geometry to be rendered with the given material.
int32_t indices
The index of the accessor that contains the vertex indices.
int32_t material
The index of the material to apply to this primitive when rendering.
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...
int32_t mode
The topology type of primitives to render.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
static constexpr const char * TypeName
The original name of this type.
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 ...