cesium-native  0.41.0
MeshPrimitive.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 
7 #include <CesiumUtility/ExtensibleObject.h>
8 
9 #include <cstdint>
10 #include <unordered_map>
11 #include <vector>
12 
13 namespace CesiumGltf {
17 struct CESIUMGLTF_API MeshPrimitive final
19  static inline constexpr const char* TypeName = "MeshPrimitive";
20 
24  struct Mode {
25  static constexpr int32_t POINTS = 0;
26 
27  static constexpr int32_t LINES = 1;
28 
29  static constexpr int32_t LINE_LOOP = 2;
30 
31  static constexpr int32_t LINE_STRIP = 3;
32 
33  static constexpr int32_t TRIANGLES = 4;
34 
35  static constexpr int32_t TRIANGLE_STRIP = 5;
36 
37  static constexpr int32_t TRIANGLE_FAN = 6;
38  };
39 
45  std::unordered_map<std::string, int32_t> attributes;
46 
54  int32_t indices = -1;
55 
59  int32_t material = -1;
60 
67  int32_t mode = Mode::TRIANGLES;
68 
72  std::vector<std::unordered_map<std::string, int32_t>> targets;
73 };
74 } // namespace CesiumGltf
Classes for working with glTF models.
Known values for The topology type of primitives to render.
Definition: MeshPrimitive.h:24
Geometry to be rendered with the given material.
Definition: MeshPrimitive.h:18
std::vector< std::unordered_map< std::string, int32_t > > targets
An array of morph targets.
Definition: MeshPrimitive.h:72
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...
Definition: MeshPrimitive.h:45
The base class for objects that have extensions and extras.