Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
CesiumModelMetadata.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
7
8#include "Containers/Array.h"
9#include "Containers/Map.h"
10#include "Containers/UnrealString.h"
11
12#include "CesiumModelMetadata.generated.h"
13
14namespace CesiumGltf {
15struct ExtensionModelExtStructuralMetadata;
16struct Model;
17} // namespace CesiumGltf
18
24USTRUCT(BlueprintType)
25struct CESIUMRUNTIME_API FCesiumModelMetadata {
26 GENERATED_USTRUCT_BODY()
27
28public:
30
32 const CesiumGltf::Model& InModel,
34
35private:
36 TArray<FCesiumPropertyTable> _propertyTables;
37 TArray<FCesiumPropertyTexture> _propertyTextures;
38 // TODO: property attributes
39
41};
42
43UCLASS()
45 : public UBlueprintFunctionLibrary {
46 GENERATED_BODY()
47
48public:
53 UFUNCTION(
54 BlueprintCallable,
55 BlueprintPure,
56 Category = "Cesium|Model|Metadata")
57 static const FCesiumModelMetadata&
58 GetModelMetadata(const UPrimitiveComponent* component);
59
60 PRAGMA_DISABLE_DEPRECATION_WARNINGS
64 UFUNCTION(
65 BlueprintCallable,
66 BlueprintPure,
67 Category = "Cesium|Metadata|Model",
68 Meta =
69 (DeprecatedFunction,
70 DeprecationMessage =
71 "Use GetPropertyTables to get an array of property tables instead."))
72 static const TMap<FString, FCesiumPropertyTable>
73 GetFeatureTables(UPARAM(ref) const FCesiumModelMetadata& ModelMetadata);
74
78 UFUNCTION(
79 BlueprintCallable,
80 BlueprintPure,
81 Category = "Cesium|Metadata|Model",
82 Meta =
83 (DeprecatedFunction,
84 DeprecationMessage =
85 "Use GetPropertyTextures to get an array of property textures instead."))
86 static const TMap<FString, FCesiumPropertyTexture>
87 GetFeatureTextures(UPARAM(ref) const FCesiumModelMetadata& ModelMetadata);
88
89 PRAGMA_ENABLE_DEPRECATION_WARNINGS
90
94 UFUNCTION(
95 BlueprintCallable,
96 BlueprintPure,
97 Category = "Cesium|Model|Metadata")
98 static const TArray<FCesiumPropertyTable>&
99 GetPropertyTables(UPARAM(ref) const FCesiumModelMetadata& ModelMetadata);
100
105 UFUNCTION(
106 BlueprintCallable,
107 BlueprintPure,
108 Category = "Cesium|Model|Metadata")
110 UPARAM(ref) const FCesiumModelMetadata& ModelMetadata,
111 const int64 Index);
112
117 UFUNCTION(
118 BlueprintCallable,
119 BlueprintPure,
120 Category = "Cesium|Model|Metadata")
122 UPARAM(ref) const FCesiumModelMetadata& ModelMetadata,
123 const TArray<int64>& Indices);
124
128 UFUNCTION(
129 BlueprintCallable,
130 BlueprintPure,
131 Category = "Cesium|Model|Metadata")
132 static const TArray<FCesiumPropertyTexture>&
133 GetPropertyTextures(UPARAM(ref) const FCesiumModelMetadata& ModelMetadata);
134
139 UFUNCTION(
140 BlueprintCallable,
141 BlueprintPure,
142 Category = "Cesium|Model|Metadata")
144 UPARAM(ref) const FCesiumModelMetadata& ModelMetadata,
145 const int64 Index);
146
151 UFUNCTION(
152 BlueprintCallable,
153 BlueprintPure,
154 Category = "Cesium|Model|Metadata")
156 UPARAM(ref) const FCesiumModelMetadata& ModelMetadata,
157 const TArray<int64>& Indices);
158};
static const FCesiumModelMetadata & GetModelMetadata(const UPrimitiveComponent *component)
Gets the model metadata of a glTF primitive component.
static PRAGMA_ENABLE_DEPRECATION_WARNINGS const TArray< FCesiumPropertyTable > & GetPropertyTables(UPARAM(ref) const FCesiumModelMetadata &ModelMetadata)
Gets an array of all the property tables for this model metadata.
static const FCesiumPropertyTexture & GetPropertyTexture(UPARAM(ref) const FCesiumModelMetadata &ModelMetadata, const int64 Index)
Gets the property table at the specified index for this model metadata.
static PRAGMA_DISABLE_DEPRECATION_WARNINGS const TMap< FString, FCesiumPropertyTable > GetFeatureTables(UPARAM(ref) const FCesiumModelMetadata &ModelMetadata)
Get all the feature tables for this model metadata.
static const TArray< FCesiumPropertyTexture > & GetPropertyTextures(UPARAM(ref) const FCesiumModelMetadata &ModelMetadata)
Gets an array of all the property textures for this model metadata.
static const TArray< FCesiumPropertyTable > GetPropertyTablesAtIndices(UPARAM(ref) const FCesiumModelMetadata &ModelMetadata, const TArray< int64 > &Indices)
Gets the property table at the specified indices for this model metadata.
static const TMap< FString, FCesiumPropertyTexture > GetFeatureTextures(UPARAM(ref) const FCesiumModelMetadata &ModelMetadata)
Get all the feature textures for this model metadata.
static const TArray< FCesiumPropertyTexture > GetPropertyTexturesAtIndices(UPARAM(ref) const FCesiumModelMetadata &ModelMetadata, const TArray< int64 > &Indices)
Gets an array of the property textures at the specified indices for this model metadata.
static const FCesiumPropertyTable & GetPropertyTable(UPARAM(ref) const FCesiumModelMetadata &ModelMetadata, const int64 Index)
Gets the property table at the specified index for this model metadata.
A blueprint-accessible wrapper for metadata contained in a glTF model.
FCesiumModelMetadata(const CesiumGltf::Model &InModel, const CesiumGltf::ExtensionModelExtStructuralMetadata &Metadata)
A Blueprint-accessible wrapper for a glTF property table.
A blueprint-accessible wrapper of a property texture from a glTF.