5#include "CesiumGltf/Enum.h"
6#include "CesiumGltf/PropertyArrayView.h"
7#include "CesiumGltf/PropertyType.h"
8#include "CesiumGltf/PropertyTypeTraits.h"
10#include "CesiumMetadataValueType.generated.h"
62static_assert(int(CesiumGltf::PropertyType::Invalid) == 0);
63static_assert(int(CesiumGltf::PropertyComponentType::None) == 0);
103 Scalar = int(CesiumGltf::PropertyType::Scalar),
104 Vec2 = int(CesiumGltf::PropertyType::Vec2),
105 Vec3 = int(CesiumGltf::PropertyType::Vec3),
106 Vec4 = int(CesiumGltf::PropertyType::Vec4),
107 Mat2 = int(CesiumGltf::PropertyType::Mat2),
108 Mat3 = int(CesiumGltf::PropertyType::Mat3),
109 Mat4 = int(CesiumGltf::PropertyType::Mat4),
110 Boolean = int(CesiumGltf::PropertyType::Boolean),
111 String = int(CesiumGltf::PropertyType::String),
112 Enum = int(CesiumGltf::PropertyType::Enum)
122 Int8 = int(CesiumGltf::PropertyComponentType::Int8),
123 Uint8 = int(CesiumGltf::PropertyComponentType::Uint8),
124 Int16 = int(CesiumGltf::PropertyComponentType::Int16),
125 Uint16 = int(CesiumGltf::PropertyComponentType::Uint16),
126 Int32 = int(CesiumGltf::PropertyComponentType::Int32),
127 Uint32 = int(CesiumGltf::PropertyComponentType::Uint32),
128 Int64 = int(CesiumGltf::PropertyComponentType::Int64),
129 Uint64 = int(CesiumGltf::PropertyComponentType::Uint64),
130 Float32 = int(CesiumGltf::PropertyComponentType::Float32),
131 Float64 = int(CesiumGltf::PropertyComponentType::Float64),
138USTRUCT(BlueprintType)
140 GENERATED_USTRUCT_BODY()
150 bool IsArray =
false)
156 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Cesium")
170 "Type != ECesiumMetadataType::Invalid && Type != ECesiumMetadataType::Boolean && Type != ECesiumMetadataType::String"))
177 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Cesium")
193TypeToMetadataValueType(TSharedPtr<FCesiumMetadataEnum> pEnumDefinition) {
201 pEnumDefinition !=
nullptr) {
221 return {type, componentType, isArray};
228static size_t GetMetadataTypeByteSize(
231 size_t componentByteSize = 0;
236 size_t byteSize = componentByteSize;
239 byteSize =
sizeof(bool);
269 const UEnum* pEnum = StaticEnum<ECesiumMetadataType>();
270 return pEnum ? pEnum->GetNameByValue((int64)type).ToString() : FString();
275 const UEnum* pEnum = StaticEnum<ECesiumMetadataComponentType>();
276 return pEnum ? pEnum->GetNameByValue((int64)type).ToString() : FString();
size_t getSizeOfComponentType(PropertyComponentType componentType)