cesium-native  0.41.0
ClassProperty.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 #include <CesiumUtility/JsonValue.h>
9 
10 #include <cstdint>
11 #include <optional>
12 #include <string>
13 
14 namespace CesiumGltf {
18 struct CESIUMGLTF_API ClassProperty final
20  static inline constexpr const char* TypeName = "ClassProperty";
21 
25  struct Type {
26  inline static const std::string SCALAR = "SCALAR";
27 
28  inline static const std::string VEC2 = "VEC2";
29 
30  inline static const std::string VEC3 = "VEC3";
31 
32  inline static const std::string VEC4 = "VEC4";
33 
34  inline static const std::string MAT2 = "MAT2";
35 
36  inline static const std::string MAT3 = "MAT3";
37 
38  inline static const std::string MAT4 = "MAT4";
39 
40  inline static const std::string STRING = "STRING";
41 
42  inline static const std::string BOOLEAN = "BOOLEAN";
43 
44  inline static const std::string ENUM = "ENUM";
45  };
46 
51  struct ComponentType {
52  inline static const std::string INT8 = "INT8";
53 
54  inline static const std::string UINT8 = "UINT8";
55 
56  inline static const std::string INT16 = "INT16";
57 
58  inline static const std::string UINT16 = "UINT16";
59 
60  inline static const std::string INT32 = "INT32";
61 
62  inline static const std::string UINT32 = "UINT32";
63 
64  inline static const std::string INT64 = "INT64";
65 
66  inline static const std::string UINT64 = "UINT64";
67 
68  inline static const std::string FLOAT32 = "FLOAT32";
69 
70  inline static const std::string FLOAT64 = "FLOAT64";
71  };
72 
76  std::optional<std::string> name;
77 
81  std::optional<std::string> description;
82 
89  std::string type = Type::SCALAR;
90 
98  std::optional<std::string> componentType;
99 
104  std::optional<std::string> enumType;
105 
111  bool array = false;
112 
117  std::optional<int64_t> count;
118 
127  bool normalized = false;
128 
134  std::optional<CesiumUtility::JsonValue> offset;
135 
141  std::optional<CesiumUtility::JsonValue> scale;
142 
149  std::optional<CesiumUtility::JsonValue> max;
150 
157  std::optional<CesiumUtility::JsonValue> min;
158 
166  bool required = false;
167 
175  std::optional<CesiumUtility::JsonValue> noData;
176 
183  std::optional<CesiumUtility::JsonValue> defaultProperty;
184 
189  std::optional<std::string> semantic;
190 };
191 } // namespace CesiumGltf
Classes for working with glTF models.
Known values for The datatype of the element's components. Only applicable to SCALAR,...
Definition: ClassProperty.h:51
Known values for The element type.
Definition: ClassProperty.h:25
A class property.
Definition: ClassProperty.h:19
std::optional< std::string > semantic
An identifier that describes how this property should be interpreted. The semantic cannot be used by ...
std::optional< std::string > componentType
The datatype of the element's components. Only applicable to SCALAR, VECN, and MATN types.
Definition: ClassProperty.h:98
std::optional< int64_t > count
The number of array elements. May only be defined when array is true.
std::optional< CesiumUtility::JsonValue > scale
A scale to apply to property values. Only applicable to SCALAR, VECN, and MATN types when the compone...
std::optional< CesiumUtility::JsonValue > offset
An offset to apply to property values. Only applicable to SCALAR, VECN, and MATN types when the compo...
std::optional< std::string > description
The description of the property.
Definition: ClassProperty.h:81
std::optional< CesiumUtility::JsonValue > noData
A noData value represents missing data — also known as a sentinel value — wherever it appears....
std::optional< CesiumUtility::JsonValue > min
Minimum allowed value for the property. Only applicable to SCALAR, VECN, and MATN types....
std::optional< std::string > enumType
Enum ID as declared in the enums dictionary. Required when type is ENUM.
std::optional< std::string > name
The name of the property, e.g. for display purposes.
Definition: ClassProperty.h:76
std::optional< CesiumUtility::JsonValue > defaultProperty
A default value to use when encountering a noData value or an omitted property. The value is given in...
std::optional< CesiumUtility::JsonValue > max
Maximum allowed value for the property. Only applicable to SCALAR, VECN, and MATN types....
The base class for objects that have extensions and extras.