Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
CesiumPropertyTable.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
7#include "Kismet/BlueprintFunctionLibrary.h"
8#include "UObject/ObjectMacros.h"
9#include "CesiumPropertyTable.generated.h"
10
11namespace CesiumGltf {
12struct Model;
13struct PropertyTable;
14} // namespace CesiumGltf
15
20UENUM(BlueprintType)
21enum class ECesiumPropertyTableStatus : uint8 {
22 /* The property table is valid. */
23 Valid = 0,
24 /* The property table instance was not initialized from an actual glTF
25 property table. */
27 /* The property table's class could be found in the schema of the metadata
28 extension. */
30};
31
37USTRUCT(BlueprintType)
38struct CESIUMRUNTIME_API FCesiumPropertyTable {
39 GENERATED_USTRUCT_BODY()
40
41public:
47
55 const CesiumGltf::Model& Model,
56 const CesiumGltf::PropertyTable& PropertyTable);
57
61 FString getClassName() const { return _className; }
62
63private:
65 FString _name;
66 FString _className;
67
68 int64 _count;
69 TMap<FString, FCesiumPropertyTableProperty> _properties;
70
72};
73
74UCLASS()
76 : public UBlueprintFunctionLibrary {
77 GENERATED_BODY()
78
79public:
86 UFUNCTION(
87 BlueprintCallable,
88 BlueprintPure,
89 Category = "Cesium|Metadata|PropertyTable")
91 GetPropertyTableStatus(UPARAM(ref) const FCesiumPropertyTable& PropertyTable);
92
99 UFUNCTION(
100 BlueprintCallable,
101 BlueprintPure,
102 Category = "Cesium|Metadata|PropertyTable")
103 static const FString&
104 GetPropertyTableName(UPARAM(ref) const FCesiumPropertyTable& PropertyTable);
105
112 UFUNCTION(
113 BlueprintCallable,
114 BlueprintPure,
115 Category = "Cesium|Metadata|PropertyTable")
116 static int64
117 GetPropertyTableCount(UPARAM(ref) const FCesiumPropertyTable& PropertyTable);
118
124 UFUNCTION(
125 BlueprintCallable,
126 BlueprintPure,
127 Category = "Cesium|Metadata|PropertyTable")
128 static const TMap<FString, FCesiumPropertyTableProperty>&
129 GetProperties(UPARAM(ref) const FCesiumPropertyTable& PropertyTable);
130
136 UFUNCTION(
137 BlueprintCallable,
138 BlueprintPure,
139 Category = "Cesium|Metadata|PropertyTable")
140 static const TArray<FString>
141 GetPropertyNames(UPARAM(ref) const FCesiumPropertyTable& PropertyTable);
142
151 UFUNCTION(
152 BlueprintCallable,
153 BlueprintPure,
154 Category = "Cesium|Metadata|PropertyTable")
156 UPARAM(ref) const FCesiumPropertyTable& PropertyTable,
157 const FString& PropertyName);
158
169 UFUNCTION(
170 BlueprintCallable,
171 BlueprintPure,
172 Category = "Cesium|Metadata|PropertyTable")
174 UPARAM(ref) const FCesiumPropertyTable& PropertyTable,
175 int64 FeatureID);
176
177 PRAGMA_DISABLE_DEPRECATION_WARNINGS
192 UFUNCTION(
193 BlueprintCallable,
194 BlueprintPure,
195 Category = "Cesium|Metadata|PropertyTable",
196 Meta =
197 (DeprecatedFunction,
198 DeprecationMessage =
199 "Use GetValuesAsStrings to convert the output of GetMetadataValuesForFeature instead."))
200 static TMap<FString, FString> GetMetadataValuesForFeatureAsStrings(
201 UPARAM(ref) const FCesiumPropertyTable& PropertyTable,
202 int64 FeatureID);
203 PRAGMA_ENABLE_DEPRECATION_WARNINGS
204};
ECesiumPropertyTableStatus
Reports the status of a FCesiumPropertyTable.
static ECesiumPropertyTableStatus GetPropertyTableStatus(UPARAM(ref) const FCesiumPropertyTable &PropertyTable)
Gets the status of the property table.
static PRAGMA_DISABLE_DEPRECATION_WARNINGS TMap< FString, FString > GetMetadataValuesForFeatureAsStrings(UPARAM(ref) const FCesiumPropertyTable &PropertyTable, int64 FeatureID)
Gets all of the property values for a given feature as strings, mapped by property name.
static TMap< FString, FCesiumMetadataValue > GetMetadataValuesForFeature(UPARAM(ref) const FCesiumPropertyTable &PropertyTable, int64 FeatureID)
Gets all of the property values for a given feature, mapped by property name.
static int64 GetPropertyTableCount(UPARAM(ref) const FCesiumPropertyTable &PropertyTable)
Gets the number of values each property in the table is expected to have.
static const FCesiumPropertyTableProperty & FindProperty(UPARAM(ref) const FCesiumPropertyTable &PropertyTable, const FString &PropertyName)
Retrieve a FCesiumPropertyTableProperty by name.
static const TArray< FString > GetPropertyNames(UPARAM(ref) const FCesiumPropertyTable &PropertyTable)
Gets the names of the properties in this property table.
static const TMap< FString, FCesiumPropertyTableProperty > & GetProperties(UPARAM(ref) const FCesiumPropertyTable &PropertyTable)
Gets all the properties of the property table, mapped by property name.
static const FString & GetPropertyTableName(UPARAM(ref) const FCesiumPropertyTable &PropertyTable)
Gets the name of the property table.
A Blueprint-accessible wrapper for a glTF metadata value.
A Blueprint-accessible wrapper for a glTF property table property in EXT_structural_metadata.
A Blueprint-accessible wrapper for a glTF property table.
FString getClassName() const
Gets the name of the metadata class that this property table conforms to.
FCesiumPropertyTable(const CesiumGltf::Model &Model, const CesiumGltf::PropertyTable &PropertyTable)
Constructs a property table from a glTF Property Table.
FCesiumPropertyTable()
Construct an empty property table instance.