Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
CesiumEncodedMetadataComponent.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "Components/ActorComponent.h"
6#include "Containers/Array.h"
7#include "Containers/UnrealString.h"
8#include "Misc/Guid.h"
9
10#if WITH_EDITOR
11#include "Materials/MaterialFunctionMaterialLayer.h"
12#endif
13
14#include "CesiumEncodedMetadataComponent.generated.h"
15
16PRAGMA_DISABLE_DEPRECATION_WARNINGS
17
22UENUM()
27
31UENUM()
38
43UENUM()
50
51// Note that these don't exhaustively cover the possibilities of glTF metadata
52// classes, they only cover the subset that can be encoded into textures. For
53// example, arbitrary size arrays and enums are excluded. Other un-encoded
54// types like strings will be coerced.
55
56struct UE_DEPRECATED(
57 5.0,
58 "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.")
60
65USTRUCT()
66struct CESIUMRUNTIME_API FPropertyDescription {
67 GENERATED_USTRUCT_BODY()
68
69
73 UPROPERTY(EditAnywhere, Category = "Cesium")
74 FString Name;
75
80 UPROPERTY(EditAnywhere, Category = "Cesium")
83
87 UPROPERTY(EditAnywhere, Category = "Cesium")
90
95 UPROPERTY(
96 EditAnywhere,
97 Category = "Cesium",
98 Meta =
99 (EditCondition =
101 bool Normalized = false;
102};
103
104struct UE_DEPRECATED(
105 5.0,
106 "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.")
108
113USTRUCT()
114struct CESIUMRUNTIME_API FFeatureTableDescription {
115 GENERATED_USTRUCT_BODY()
116
117
121 UPROPERTY(EditAnywhere, Category = "Cesium")
122 FString Name;
123
128 UPROPERTY(EditAnywhere, Category = "Cesium")
131
136 UPROPERTY(
137 EditAnywhere,
138 Category = "Cesium",
139 Meta =
140 (EditCondition =
142 FString Channel;
143
147 UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Name"))
148 TArray<FPropertyDescription> Properties;
149};
150
151struct UE_DEPRECATED(
152 5.0,
153 "CesiumEncodedMetadataComponent and its related properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.")
155
160USTRUCT()
161struct CESIUMRUNTIME_API FFeatureTexturePropertyDescription {
162 GENERATED_USTRUCT_BODY()
163
164
168 UPROPERTY(EditAnywhere, Category = "Cesium")
169 FString Name;
170
171 // For now, always assumes it is Uint8
172 /*
173 UPROPERTY(EditAnywhere, Category = "Cesium")
174 ECesiumPropertyComponentType ComponentType =
175 ECesiumPropertyComponentType::Uint8;*/
176
180 UPROPERTY(EditAnywhere, Category = "Cesium")
183
188 UPROPERTY(EditAnywhere, Category = "Cesium")
189 bool Normalized = false;
190
196 UPROPERTY(EditAnywhere, Category = "Cesium")
197 FString Swizzle;
198};
199
200struct UE_DEPRECATED(
201 5.0,
202 "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.")
204
209USTRUCT()
210struct CESIUMRUNTIME_API FFeatureTextureDescription {
211 GENERATED_USTRUCT_BODY()
212
213
216 UPROPERTY(EditAnywhere, Category = "Cesium")
217 FString Name;
218
222 UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Name"))
224};
225
226struct UE_DEPRECATED(
227 5.0,
228 "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.")
230
231struct UE_DEPRECATED(
232 5.0,
233 "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.")
235
240USTRUCT()
241struct CESIUMRUNTIME_API FMetadataDescription {
242 GENERATED_USTRUCT_BODY()
243
244
247 UPROPERTY(
248 EditAnywhere,
249 Category = "EncodeMetadata",
250 Meta = (TitleProperty = "Name"))
251 TArray<FFeatureTableDescription> FeatureTables;
252
256 UPROPERTY(
257 EditAnywhere,
258 Category = "EncodeMetadata",
259 Meta = (TitleProperty = "Name"))
260 TArray<FFeatureTextureDescription> FeatureTextures;
261};
262
271UCLASS(Deprecated)
273 : public UActorComponent {
274 GENERATED_BODY()
275
276public:
277#if WITH_EDITORONLY_DATA
285 UPROPERTY(
286 EditAnywhere,
287 Category = "EncodeMetadata",
288 Meta =
289 (DeprecatedProperty,
290 DeprecationMessage =
291 "CesiumEncodedMetadataComponent is deprecated. Use CesiumFeaturesMetadataComponent instead."))
292 UMaterialFunctionMaterialLayer* TargetMaterialLayer = nullptr;
293#endif
294
295 // Note: Here, we avoid wrapping the feature tables and feature textures
296 // inside a FMetadataDescription to avoid further complicating the details
297 // panel UI for editing the hierarchy.
298
302 UPROPERTY(
303 EditAnywhere,
304 Category = "EncodeMetadata",
305 Meta =
306 (TitleProperty = "Name",
307 DeprecatedProperty,
308 DeprecationMessage =
309 "CesiumEncodedMetadataComponent is deprecated. Use CesiumFeaturesMetadataComponent instead."))
310 TArray<FFeatureTableDescription> FeatureTables;
311
315 UPROPERTY(
316 EditAnywhere,
317 Category = "EncodeMetadata",
318 Meta =
319 (TitleProperty = "Name",
320 DeprecatedProperty,
321 DeprecationMessage =
322 "CesiumEncodedMetadataComponent is deprecated. Use CesiumFeaturesMetadataComponent instead."))
323 TArray<FFeatureTextureDescription> FeatureTextures;
324
325 // virtual void Serialize(FArchive& Ar) override;
326};
327
328PRAGMA_ENABLE_DEPRECATION_WARNINGS
ECesiumFeatureTableAccessType_DEPRECATED
Describes how this feature table is accessed.
ECesiumPropertyType_DEPRECATED
The property type.
ECesiumPropertyComponentType_DEPRECATED
The GPU component type to coerce this property to.
An actor component that can be added to Cesium3DTileset actors to dictate what metadata to encode for...
Description of a feature table containing properties to be encoded for access on the GPU.
Description of a feature texture with properties that should be uploaded to the GPU.
Description of a feature texture property that should be uploaded to the GPU.
Description of metadata from a glTF that should be uploaded to the GPU for access in materials.
Description of a feature table property that should be encoded for access on the GPU.