8#include "Kismet/BlueprintFunctionLibrary.h"
9#include "Misc/Optional.h"
10#include "UObject/ObjectMacros.h"
12#include <CesiumGltf/PropertyTypeTraits.h>
15#include <swl/variant.hpp>
17#include "CesiumMetadataValue.generated.h"
24 GENERATED_USTRUCT_BODY()
27#pragma region ValueType declaration
28 using ValueType = swl::variant<
45 glm::vec<2, uint16_t>,
47 glm::vec<2, uint32_t>,
49 glm::vec<2, uint64_t>,
55 glm::vec<3, uint16_t>,
57 glm::vec<3, uint32_t>,
59 glm::vec<3, uint64_t>,
65 glm::vec<4, uint16_t>,
67 glm::vec<4, uint32_t>,
69 glm::vec<4, uint64_t>,
72 glm::mat<2, 2, int8_t>,
73 glm::mat<2, 2, uint8_t>,
74 glm::mat<2, 2, int16_t>,
75 glm::mat<2, 2, uint16_t>,
76 glm::mat<2, 2, int32_t>,
77 glm::mat<2, 2, uint32_t>,
78 glm::mat<2, 2, int64_t>,
79 glm::mat<2, 2, uint64_t>,
80 glm::mat<2, 2, float>,
81 glm::mat<2, 2, double>,
82 glm::mat<3, 3, int8_t>,
83 glm::mat<3, 3, uint8_t>,
84 glm::mat<3, 3, int16_t>,
85 glm::mat<3, 3, uint16_t>,
86 glm::mat<3, 3, int32_t>,
87 glm::mat<3, 3, uint32_t>,
88 glm::mat<3, 3, int64_t>,
89 glm::mat<3, 3, uint64_t>,
90 glm::mat<3, 3, float>,
91 glm::mat<3, 3, double>,
92 glm::mat<4, 4, int8_t>,
93 glm::mat<4, 4, uint8_t>,
94 glm::mat<4, 4, int16_t>,
95 glm::mat<4, 4, uint16_t>,
96 glm::mat<4, 4, int32_t>,
97 glm::mat<4, 4, uint32_t>,
98 glm::mat<4, 4, int64_t>,
99 glm::mat<4, 4, uint64_t>,
100 glm::mat<4, 4, float>,
101 glm::mat<4, 4, double>>;
117 template <
typename T>
120 const TSharedPtr<FCesiumMetadataEnum>& pEnumDefinition)
123 _valueType(TypeToMetadataValueType<T>(pEnumDefinition)),
124 _pEnumDefinition(pEnumDefinition) {}
131 template <
typename T>
137 template <
typename ArrayType>
140 const TSharedPtr<FCesiumMetadataEnum>& pEnumDefinition =
nullptr)
142 CesiumGltf::PropertyArrayView<ArrayType>(Value),
145 template <
typename ArrayType>
148 const TSharedPtr<FCesiumMetadataEnum>& pEnumDefinition =
nullptr)
150 CesiumGltf::PropertyArrayCopy<ArrayType>(Copy),
153 template <
typename ArrayType>
156 const TSharedPtr<FCesiumMetadataEnum>& pEnumDefinition =
nullptr)
160 TypeToMetadataValueType<
CesiumGltf::PropertyArrayView<ArrayType>>(
162 _pEnumDefinition(pEnumDefinition) {}
164 template <
typename ArrayType>
167 const TSharedPtr<FCesiumMetadataEnum>& pEnumDefinition =
nullptr)
171 TypeToMetadataValueType<
CesiumGltf::PropertyArrayView<ArrayType>>(
173 _pEnumDefinition(pEnumDefinition) {}
182 template <
typename T>
184 const std::optional<T>& MaybeValue,
185 const TSharedPtr<FCesiumMetadataEnum>& pEnumDefinition =
nullptr)
189 _pEnumDefinition(pEnumDefinition) {
195 this->_value = std::move(temp._value);
196 this->_arrayValue = std::move(temp._arrayValue);
197 this->_valueType = std::move(temp._valueType);
207 TOptional<FCesiumPropertyArray> _arrayValue;
209 TSharedPtr<FCesiumMetadataEnum> _pEnumDefinition;
217 : public UBlueprintFunctionLibrary {
229 Category =
"Cesium|Metadata|Value")
240 Category =
"Cesium|Metadata|Value")
252 Category =
"Cesium|Metadata|Value")
256 PRAGMA_DISABLE_DEPRECATION_WARNINGS
267 "CesiumMetadataTrueType is deprecated. Use GetValueType to get the CesiumMetadataValueType instead."))
282 "CesiumMetadataTrueType is deprecated. Use GetValueType to get the CesiumMetadataValueType instead."))
286 PRAGMA_ENABLE_DEPRECATION_WARNINGS
311 Category =
"Cesium|Metadata|Value")
341 Category =
"Cesium|Metadata|Value")
373 Category =
"Cesium|Metadata|Value")
405 Category =
"Cesium|Metadata|Value")
437 Category =
"Cesium|Metadata|Value")
467 Category =
"Cesium|Metadata|Value")
470 double DefaultValue);
502 Category =
"Cesium|Metadata|Value")
505 const FIntPoint& DefaultValue);
535 Category =
"Cesium|Metadata|Value")
538 const FVector2D& DefaultValue);
573 Category =
"Cesium|Metadata|Value")
576 const FIntVector& DefaultValue);
612 Category =
"Cesium|Metadata|Value")
615 const FVector3f& DefaultValue);
648 Category =
"Cesium|Metadata|Value")
651 const FVector& DefaultValue);
686 Category =
"Cesium|Metadata|Value")
689 const FVector4& DefaultValue);
725 Category =
"Cesium|Metadata|Value")
728 const FMatrix& DefaultValue);
759 Category =
"Cesium|Metadata|Value")
762 const FString& DefaultValue);
774 Category =
"Cesium|Metadata|Value")
791 Category =
"Cesium|Metadata|Value")
805 Category =
"Cesium|Metadata|Value")
806 static TMap<FString, FString>
A Blueprint-accessible wrapper for an array property in glTF metadata.