cesium-native 0.48.0
Loading...
Searching...
No Matches
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#include <CesiumUtility/ExtensibleObject.h>
7#include <CesiumUtility/JsonValue.h>
8
9#include <cstdint>
10#include <optional>
11#include <string>
12
13namespace CesiumGltf {
17struct CESIUMGLTF_API ClassProperty final
22 static constexpr const char* TypeName = "ClassProperty";
23
27 struct Type {
29 inline static const std::string SCALAR = "SCALAR";
30
32 inline static const std::string VEC2 = "VEC2";
33
35 inline static const std::string VEC3 = "VEC3";
36
38 inline static const std::string VEC4 = "VEC4";
39
41 inline static const std::string MAT2 = "MAT2";
42
44 inline static const std::string MAT3 = "MAT3";
45
47 inline static const std::string MAT4 = "MAT4";
48
50 inline static const std::string STRING = "STRING";
51
53 inline static const std::string BOOLEAN = "BOOLEAN";
54
56 inline static const std::string ENUM = "ENUM";
57 };
58
65 inline static const std::string INT8 = "INT8";
66
68 inline static const std::string UINT8 = "UINT8";
69
71 inline static const std::string INT16 = "INT16";
72
74 inline static const std::string UINT16 = "UINT16";
75
77 inline static const std::string INT32 = "INT32";
78
80 inline static const std::string UINT32 = "UINT32";
81
83 inline static const std::string INT64 = "INT64";
84
86 inline static const std::string UINT64 = "UINT64";
87
89 inline static const std::string FLOAT32 = "FLOAT32";
90
92 inline static const std::string FLOAT64 = "FLOAT64";
93 };
94
98 std::optional<std::string> name;
99
103 std::optional<std::string> description;
104
111 std::string type = Type::SCALAR;
112
120 std::optional<std::string> componentType;
121
126 std::optional<std::string> enumType;
127
133 bool array = false;
134
139 std::optional<int64_t> count;
140
149 bool normalized = false;
150
156 std::optional<CesiumUtility::JsonValue> offset;
157
163 std::optional<CesiumUtility::JsonValue> scale;
164
171 std::optional<CesiumUtility::JsonValue> max;
172
179 std::optional<CesiumUtility::JsonValue> min;
180
188 bool required = false;
189
197 std::optional<CesiumUtility::JsonValue> noData;
198
205 std::optional<CesiumUtility::JsonValue> defaultProperty;
206
211 std::optional<std::string> semantic;
212
219 int64_t getSizeBytes() const {
220 int64_t accum = 0;
221 accum += int64_t(sizeof(ClassProperty));
223 int64_t(sizeof(CesiumUtility::ExtensibleObject));
224 if (this->name) {
225 accum += int64_t(this->name->capacity() * sizeof(char));
226 }
227 if (this->description) {
228 accum += int64_t(this->description->capacity() * sizeof(char));
229 }
230 if (this->enumType) {
231 accum += int64_t(this->enumType->capacity() * sizeof(char));
232 }
233 if (this->semantic) {
234 accum += int64_t(this->semantic->capacity() * sizeof(char));
235 }
236 return accum;
237 }
238};
239} // namespace CesiumGltf
Classes for working with glTF models.
Known values for The datatype of the element's components. Only applicable to SCALAR,...
static const std::string INT32
INT32
static const std::string INT16
INT16
static const std::string FLOAT32
FLOAT32
static const std::string INT8
INT8
static const std::string INT64
INT64
static const std::string UINT8
UINT8
static const std::string UINT32
UINT32
static const std::string FLOAT64
FLOAT64
static const std::string UINT16
UINT16
static const std::string UINT64
UINT64
Known values for The element type.
static const std::string STRING
STRING
static const std::string MAT4
MAT4
static const std::string VEC4
VEC4
static const std::string VEC3
VEC3
static const std::string ENUM
ENUM
static const std::string MAT3
MAT3
static const std::string MAT2
MAT2
static const std::string VEC2
VEC2
static const std::string SCALAR
SCALAR
static const std::string BOOLEAN
BOOLEAN
std::optional< std::string > semantic
An identifier that describes how this property should be interpreted. The semantic cannot be used by ...
bool normalized
Specifies whether integer values are normalized. Only applicable to SCALAR, VECN, and MATN types with...
std::optional< std::string > componentType
The datatype of the element's components. Only applicable to SCALAR, VECN, and MATN types.
int64_t getSizeBytes() const
Calculates the size in bytes of this object, including the contents of all collections,...
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...
bool array
Whether the property is an array. When count is defined the property is a fixed-length array....
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.
static constexpr const char * TypeName
The original name of this type.
std::optional< CesiumUtility::JsonValue > noData
A noData value represents missing data — also known as a sentinel value — wherever it appears....
std::string type
The element type.
std::optional< CesiumUtility::JsonValue > min
Minimum allowed value for the property. Only applicable to SCALAR, VECN, and MATN types....
bool required
If required, the property must be present in every entity conforming to the class....
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.
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.
int64_t getSizeBytes() const
Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including ...