5#include "CesiumGltf/PropertyTablePropertyView.h"
6#include "CesiumGltf/PropertyTypeTraits.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11#include "UObject/ObjectMacros.h"
16#include "CesiumPropertyTableProperty.generated.h"
44 GENERATED_USTRUCT_BODY()
62 template <
typename T,
bool Normalized>
68 _normalized(Normalized) {
69 switch (Property.status()) {
70 case CesiumGltf::PropertyTablePropertyViewStatus::Valid:
71 _status = ECesiumPropertyTablePropertyStatus::Valid;
73 case CesiumGltf::PropertyTablePropertyViewStatus::EmptyPropertyWithDefault:
74 _status = ECesiumPropertyTablePropertyStatus::EmptyPropertyWithDefault;
76 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidPropertyTable:
77 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorNonexistentProperty:
78 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorTypeMismatch:
79 case CesiumGltf::PropertyTablePropertyViewStatus::
80 ErrorComponentTypeMismatch:
81 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorArrayTypeMismatch:
82 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidNormalization:
83 case CesiumGltf::PropertyTablePropertyViewStatus::
84 ErrorNormalizationMismatch:
85 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidOffset:
86 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidScale:
87 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidMax:
88 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidMin:
89 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidNoDataValue:
90 case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidDefaultValue:
94 _status = ECesiumPropertyTablePropertyStatus::ErrorInvalidPropertyData;
98 _valueType = TypeToMetadataValueType<T>();
99 _normalized = Normalized;
115 : public UBlueprintFunctionLibrary {
128 Category =
"Cesium|Metadata|PropertyTableProperty")
142 Category = "Cesium|Metadata|PropertyTableProperty")
156 Category = "Cesium|Metadata|PropertyTableProperty")
160 PRAGMA_DISABLE_DEPRECATION_WARNINGS
177 PRAGMA_ENABLE_DEPRECATION_WARNINGS
189 Category = "Cesium|Metadata|PropertyTableProperty")
193 PRAGMA_DISABLE_DEPRECATION_WARNINGS
206 "CesiumMetadataTrueType is deprecated. Use
GetValueType to get the CesiumMetadataValueType instead."))
224 "CesiumMetadataTrueType is deprecated. Use
GetValueType to get the CesiumMetadataValueType instead."))
228 PRAGMA_ENABLE_DEPRECATION_WARNINGS
238 Category = "Cesium|Metadata|PropertyTableProperty")
242 PRAGMA_DISABLE_DEPRECATION_WARNINGS
256 PRAGMA_ENABLE_DEPRECATION_WARNINGS
267 Category = "Cesium|Metadata|PropertyTableProperty")
271 PRAGMA_DISABLE_DEPRECATION_WARNINGS
286 PRAGMA_ENABLE_DEPRECATION_WARNINGS
322 Category = "Cesium|Metadata|PropertyTableProperty")
326 bool DefaultValue = false);
364 Category = "Cesium|Metadata|PropertyTableProperty")
368 uint8 DefaultValue = 0);
409 Category = "Cesium|Metadata|PropertyTableProperty")
413 int32 DefaultValue = 0);
453 Category = "Cesium|Metadata|PropertyTableProperty")
457 int64 DefaultValue = 0);
498 Category = "Cesium|Metadata|PropertyTableProperty")
502 float DefaultValue = 0.0f);
542 Category = "Cesium|Metadata|PropertyTableProperty")
546 double DefaultValue = 0.0);
591 Category = "Cesium|Metadata|PropertyTableProperty")
595 const FIntPoint& DefaultValue);
636 Category = "Cesium|Metadata|PropertyTableProperty")
640 const FVector2D& DefaultValue);
688 Category = "Cesium|Metadata|PropertyTableProperty")
692 const FIntVector& DefaultValue);
740 Category = "Cesium|Metadata|PropertyTableProperty")
744 const FVector3f& DefaultValue);
788 Category = "Cesium|Metadata|PropertyTableProperty")
792 const FVector& DefaultValue);
838 Category = "Cesium|Metadata|PropertyTableProperty")
842 const FVector4& DefaultValue);
889 Category = "Cesium|Metadata|PropertyTableProperty")
893 const FMatrix& DefaultValue);
933 Category = "Cesium|Metadata|PropertyTableProperty")
937 const FString& DefaultValue = "");
958 Category = "Cesium|Metadata|PropertyTableProperty")
981 Category = "Cesium|Metadata|PropertyTableProperty")
986 PRAGMA_DISABLE_DEPRECATION_WARNINGS
999 Meta = (DeprecatedFunction, DeprecatedMessage = "Use
GetValue instead."))
1003 PRAGMA_ENABLE_DEPRECATION_WARNINGS
1022 Category = "Cesium|Metadata|PropertyTableProperty")
1037 Category = "Cesium|Metadata|PropertyTableProperty")
1055 Category = "Cesium|Metadata|PropertyTableProperty")
1073 Category = "Cesium|Metadata|PropertyTableProperty")
1093 Category = "Cesium|Metadata|PropertyTableProperty")
1113 Category = "Cesium|Metadata|PropertyTableProperty")
1132 Category = "Cesium|Metadata|PropertyTableProperty")
1149 Category = "Cesium|Metadata|PropertyTableProperty")
ECesiumPropertyTablePropertyStatus
Reports the status of a FCesiumPropertyTableProperty.
@ EmptyPropertyWithDefault
@ ErrorInvalidPropertyData
static FCesiumPropertyArray GetArray(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID)
Attempts to retrieve the value for the given feature as a FCesiumPropertyArray.
static PRAGMA_DISABLE_DEPRECATION_WARNINGS FCesiumMetadataValue GetGenericValue(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID)
Retrieves the value of the property for the given feature.
static FVector3f GetVector3f(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, const FVector3f &DefaultValue)
Attempts to retrieve the value for the given feature as a FVector3f.
static PRAGMA_ENABLE_DEPRECATION_WARNINGS int64 GetArraySize(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the number of elements in an array of this property.
static int32 GetInteger(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, int32 DefaultValue=0)
Attempts to retrieve the value for the given feature as a signed 32-bit integer.
static FCesiumMetadataValue GetMaximumValue(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the maximum value of this property.
static FCesiumMetadataValue GetScale(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the scale of this property.
static PRAGMA_DISABLE_DEPRECATION_WARNINGS int64 GetNumberOfFeatures(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the number of values in this property.
static FIntPoint GetIntPoint(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, const FIntPoint &DefaultValue)
Attempts to retrieve the value for the given feature as a FIntPoint.
static PRAGMA_DISABLE_DEPRECATION_WARNINGS ECesiumMetadataTrueType_DEPRECATED GetTrueType(UPARAM(ref) const FCesiumPropertyTableProperty &Value)
Gets true type of the value.
static PRAGMA_DISABLE_DEPRECATION_WARNINGS int64 GetComponentCount(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the number of elements in an array of this property.
static FMatrix GetMatrix(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, const FMatrix &DefaultValue)
Attempts to retrieve the value for the given feature as a FMatrix.
static FCesiumMetadataValue GetMinimumValue(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the minimum value of this property.
static FVector2D GetVector2D(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, const FVector2D &DefaultValue)
Attempts to retrieve the value for the given feature as a FVector2D.
static PRAGMA_DISABLE_DEPRECATION_WARNINGS ECesiumMetadataBlueprintType GetBlueprintComponentType(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the best-fitting Blueprints type for the elements in this property's array values.
static PRAGMA_ENABLE_DEPRECATION_WARNINGS bool GetBoolean(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, bool DefaultValue=false)
Attempts to retrieve the value for the given feature as a boolean.
static FIntVector GetIntVector(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, const FIntVector &DefaultValue)
Attempts to retrieve the value for the given feature as a FIntVector.
static FCesiumMetadataValue GetDefaultValue(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the default value of this property, as defined by its class property.
static double GetFloat64(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, double DefaultValue=0.0)
Attempts to retrieve the value for the given feature as a double-precision floating-point number.
static float GetFloat(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, float DefaultValue=0.0f)
Attempts to retrieve the value for the given feature as a single-precision floating-point number.
static FVector4 GetVector4(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, const FVector4 &DefaultValue)
Attempts to retrieve the value for the given feature as a FVector4.
static int64 GetInteger64(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, int64 DefaultValue=0)
Attempts to retrieve the value for the given feature as a signed 64-bit integer.
static ECesiumMetadataBlueprintType GetBlueprintType(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the best-fitting type for the property that is accessible from Blueprints.
static uint8 GetByte(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, uint8 DefaultValue=0)
Attempts to retrieve the value for the given feature as an unsigned 8-bit integer.
static FString GetString(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, const FString &DefaultValue="")
Attempts to retrieve the value for the given feature as a FString.
static bool IsNormalized(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Whether this property is normalized.
static ECesiumPropertyTablePropertyStatus GetPropertyTablePropertyStatus(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the status of the property table property.
static ECesiumMetadataTrueType_DEPRECATED GetTrueComponentType(UPARAM(ref) const FCesiumPropertyTableProperty &Value)
Gets true type of the elements in this array property.
static PRAGMA_ENABLE_DEPRECATION_WARNINGS FCesiumMetadataValue GetRawValue(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID)
Retrieves the raw value of the property for the given feature.
static PRAGMA_ENABLE_DEPRECATION_WARNINGS int64 GetPropertySize(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the number of values in the property.
static PRAGMA_ENABLE_DEPRECATION_WARNINGS FCesiumMetadataValueType GetValueType(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the type of the metadata value as defined in the EXT_structural_metadata extension.
static FCesiumMetadataValue GetNoDataValue(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the "no data" value of this property, as defined by its class property.
static ECesiumMetadataBlueprintType GetArrayElementBlueprintType(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the best-fitting Blueprints type for the elements in this property's array values.
static FCesiumMetadataValue GetValue(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID)
Retrieves the value of the property for the given feature.
static FVector GetVector(UPARAM(ref) const FCesiumPropertyTableProperty &Property, int64 FeatureID, const FVector &DefaultValue)
Attempts to retrieve the value for the given feature as a FVector.
static FCesiumMetadataValue GetOffset(UPARAM(ref) const FCesiumPropertyTableProperty &Property)
Gets the offset of this property.
A Blueprint-accessible wrapper for an array property in glTF metadata.
A Blueprint-accessible wrapper for a glTF property table property in EXT_structural_metadata.
FCesiumPropertyTableProperty()
Construct an invalid property with an unknown type.
FCesiumPropertyTableProperty(const CesiumGltf::PropertyTablePropertyView< T, Normalized > &Property)
Construct a wrapper for the property table property view.