cesium-native  0.41.0
AccessorSpec.h
1 // This file was generated by generate-classes.
2 // DO NOT EDIT THIS FILE!
3 #pragma once
4 
5 #include "CesiumGltf/AccessorSparse.h"
6 #include "CesiumGltf/Library.h"
7 #include "CesiumGltf/NamedObject.h"
8 
9 #include <cstdint>
10 #include <optional>
11 #include <string>
12 #include <vector>
13 
14 namespace CesiumGltf {
18 struct CESIUMGLTF_API AccessorSpec : public CesiumGltf::NamedObject {
19  static inline constexpr const char* TypeName = "Accessor";
20 
24  struct ComponentType {
25  static constexpr int32_t BYTE = 5120;
26 
27  static constexpr int32_t UNSIGNED_BYTE = 5121;
28 
29  static constexpr int32_t SHORT = 5122;
30 
31  static constexpr int32_t UNSIGNED_SHORT = 5123;
32 
33  static constexpr int32_t INT = 5124;
34 
35  static constexpr int32_t UNSIGNED_INT = 5125;
36 
37  static constexpr int32_t INT64 = 5134;
38 
39  static constexpr int32_t UNSIGNED_INT64 = 5135;
40 
41  static constexpr int32_t FLOAT = 5126;
42 
43  static constexpr int32_t DOUBLE = 5130;
44  };
45 
50  struct Type {
51  inline static const std::string SCALAR = "SCALAR";
52 
53  inline static const std::string VEC2 = "VEC2";
54 
55  inline static const std::string VEC3 = "VEC3";
56 
57  inline static const std::string VEC4 = "VEC4";
58 
59  inline static const std::string MAT2 = "MAT2";
60 
61  inline static const std::string MAT3 = "MAT3";
62 
63  inline static const std::string MAT4 = "MAT4";
64  };
65 
73  int32_t bufferView = -1;
74 
81  int64_t byteOffset = 0;
82 
92  int32_t componentType = ComponentType::BYTE;
93 
102  bool normalized = false;
103 
110  int64_t count = int64_t();
111 
119  std::string type = Type::SCALAR;
120 
134  std::vector<double> max;
135 
149  std::vector<double> min;
150 
155  std::optional<CesiumGltf::AccessorSparse> sparse;
156 
157 private:
161  AccessorSpec() = default;
162  friend struct Accessor;
163 };
164 } // namespace CesiumGltf
Classes for working with glTF models.
Known values for The datatype of the accessor's components.
Definition: AccessorSpec.h:24
Known values for Specifies if the accessor's elements are scalars, vectors, or matrices.
Definition: AccessorSpec.h:50
A typed view into a buffer view that contains raw binary data.
Definition: AccessorSpec.h:18
std::optional< CesiumGltf::AccessorSparse > sparse
Sparse storage of elements that deviate from their initialization value.
Definition: AccessorSpec.h:155
std::vector< double > min
Minimum value of each component in this accessor.
Definition: AccessorSpec.h:149
std::vector< double > max
Maximum value of each component in this accessor.
Definition: AccessorSpec.h:134
A typed view into a buffer view that contains raw binary data.
Definition: Accessor.h:12
The base class for objects in a glTF that have a name.
Definition: NamedObject.h:15