Cesium for Unreal 2.24.1
Loading...
Searching...
No Matches
CesiumFeaturesMetadataDescription.h
Go to the documentation of this file.
1// Copyright 2020-2025 CesiumGS, Inc. and Contributors
2
3#pragma once
4
9#include "Containers/Array.h"
10#include "Containers/UnrealString.h"
11#include "Misc/Guid.h"
12
13#include "CesiumFeaturesMetadataDescription.generated.h"
14
15#pragma region Features descriptions
16
17/**
18 * @brief Description of a feature ID set from either EXT_mesh_features or
19 * EXT_instance_features.
20 */
21USTRUCT()
22struct CESIUMRUNTIME_API FCesiumFeatureIdSetDescription {
23 GENERATED_USTRUCT_BODY()
24
25 /**
26 * The display name of the feature ID set. If the feature ID set already has a
27 * label, this will use the label. Otherwise, if the feature ID set is
28 * unlabeled, a name will be generated like so:
29 *
30 * - If the feature ID set is an attribute, this will appear as
31 * "_FEATURE_ID_<index>", where <index> is the set index specified in
32 * the attribute.
33 * - If the feature ID set is a texture, this will appear as
34 * "_FEATURE_ID_TEXTURE_<index>", where <index> increments with the number
35 * of feature ID textures seen in an individual primitive.
36 * - If the feature ID set is an implicit set, this will appear as
37 * "_IMPLICIT_FEATURE_ID". Implicit feature ID sets don't vary in definition,
38 * so any additional implicit feature ID sets across the primitives are
39 * counted by this one.
40 *
41 * This name will also be used to represent the feature ID set in the
42 * generated material.
43 */
44 UPROPERTY(EditAnywhere, Category = "Cesium|Features")
45 FString Name;
46
47 /**
48 * The type of the feature ID set.
49 */
50 UPROPERTY(EditAnywhere, Category = "Cesium|Features")
52
53 /**
54 * The name of the property table that this feature ID set corresponds to.
55 */
56 UPROPERTY(EditAnywhere, Category = "Cesium|Features")
58};
59
60/**
61 * @brief Description of the feature ID sets available from the
62 * EXT_mesh_features and EXT_instance_features extensions in a glTF.
63 *
64 * This aggregates the feature ID sets of all visible glTF primitives in the
65 * model. This describes the feature IDs that can be made accessible
66 * to Unreal Engine materials.
67 */
68USTRUCT()
69struct CESIUMRUNTIME_API FCesiumPrimitiveFeaturesDescription {
70 GENERATED_USTRUCT_BODY()
71
72 /**
73 * @brief The feature ID sets to make accessible to the material. Note that
74 * the order of feature ID sets in this array does not necessarily
75 * correspond to the order of these feature ID sets in a glTF
76 * primitive.
77 */
78 UPROPERTY(
79 EditAnywhere,
80 Category = "Cesium|Features",
81 Meta = (TitleProperty = "Name"))
83};
84#pragma endregion
85
86#pragma region Metadata descriptions
87
88// These don't exhaustively cover the possibilities of glTF metadata
89// classes, they only cover the subset that can be encoded into textures. The
90// following types are excluded:
91// - enums
92// - strings that cannot be parsed as numbers or colors
93// - matrices
94// - variable length arrays
95// - arrays of non-scalar, non-boolean elements
96//
97// Additionally, if a property contains fixed-length arrays, only the first four
98// elements can be encoded.
99
100/**
101 * @brief Description of a property table property that should be encoded for
102 * access on the GPU.
103 */
104USTRUCT()
106 GENERATED_USTRUCT_BODY()
107
108 /**
109 * The name of this property. This will be how it is referenced in the
110 * material.
111 */
112 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata")
113 FString Name;
114
115 /**
116 * Describes the underlying type of this property and other relevant
117 * information from its EXT_structural_metadata definition. Not all types of
118 * properties can be encoded to the GPU, or coerced to GPU-compatible types.
119 */
120 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata")
122
123 /**
124 * Describes how the property will be encoded as data on the GPU, if possible.
125 */
126 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata")
128};
129
130/**
131 * @brief Description of a property table containing properties to be encoded
132 * for access in Unreal materials.
133 */
134USTRUCT()
135struct CESIUMRUNTIME_API FCesiumPropertyTableDescription {
136 GENERATED_USTRUCT_BODY()
137
138 /**
139 * @brief The name of this property table. If this property table has no name
140 * in the EXT_structural_metadata extension, then its class name is used
141 * instead.
142 */
143 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata")
144 FString Name;
145
146 /**
147 * @brief Descriptions of the properties to upload to the GPU.
148 */
149 UPROPERTY(
150 EditAnywhere,
151 Category = "Cesium|Metadata",
152 Meta = (TitleProperty = "Name"))
154};
155
156/**
157 * @brief Description of a property texture property that should be made
158 * accessible to Unreal materials. A property texture property's data is
159 * already available through a texture, so no additional encoding details need
160 * to be specified.
161 */
162USTRUCT()
164 GENERATED_USTRUCT_BODY()
165
166 /**
167 * The name of this property. This will be how it is referenced in the
168 * material.
169 */
170 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata")
171 FString Name;
172
173 /**
174 * Describes the underlying type of this property and other relevant
175 * information from its EXT_structural_metadata definition.
176 */
177 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata")
179};
180
181/**
182 * @brief Description of a property texture with properties that should be
183 * made accessible to Unreal materials.
184 */
185USTRUCT()
186struct CESIUMRUNTIME_API FCesiumPropertyTextureDescription {
187 GENERATED_USTRUCT_BODY()
188
189 /**
190 * @brief The name of this property texture.
191 */
192 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata")
193 FString Name;
194
195 /**
196 * @brief Descriptions of the properties to upload to the GPU.
197 */
198 UPROPERTY(
199 EditAnywhere,
200 Category = "Cesium|Metadata",
201 Meta = (TitleProperty = "Name"))
203};
204
205/**
206 * @brief Description of a property attribute property that should be encoded
207 * for access on the GPU.
208 *
209 * This is similar to FCesiumPropertyTablePropertyDescription, but is limited to
210 * the types that are supported for property attribute properties.
211 */
212USTRUCT()
214 GENERATED_USTRUCT_BODY()
215
216 /**
217 * The name of this property. This will be how it is referenced in the
218 * material.
219 */
220 UPROPERTY(EditAnywhere, Category = "Cesium")
221 FString Name;
222
223 /**
224 * Describes the underlying type of this property and other relevant
225 * information from its EXT_structural_metadata definition. Not all types of
226 * properties can be encoded to the GPU, or coerced to GPU-compatible types.
227 */
228 UPROPERTY(EditAnywhere, Category = "Cesium")
230
231 /**
232 * Describes how the property will be encoded as data on the GPU, if possible.
233 */
234 UPROPERTY(EditAnywhere, Category = "Cesium")
236};
237
238/**
239 * @brief Description of a property attribute with properties that should be
240 * made accessible to Unreal materials.
241 */
242USTRUCT()
243struct CESIUMRUNTIME_API FCesiumPropertyAttributeDescription {
244 GENERATED_USTRUCT_BODY()
245
246 /**
247 * @brief The name of this property attribute.
248 */
249 UPROPERTY(EditAnywhere, Category = "Cesium")
250 FString Name;
251
252 /**
253 * @brief Descriptions of the properties to upload to the GPU.
254 */
255 UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Name"))
257};
258
259/**
260 * @brief Names of the metadata entities referenced by the
261 * EXT_structural_metadata on a glTF's primitives.
262 *
263 * This aggregates the metadata of all visible glTF primitives in the model.
264 * This lists the names of the property textures actually used by the glTF
265 * primitive, indicating it can be sampled with the primitive's texture
266 * coordinates in the Unreal material.
267 */
268USTRUCT()
269struct CESIUMRUNTIME_API FCesiumPrimitiveMetadataDescription {
270 GENERATED_USTRUCT_BODY()
271
272 /**
273 * @brief The names of the property textures used by the glTF primitives
274 * across the tileset.
275 *
276 * This should be a subset of the property textures listed in the model
277 * metadata. Property textures can be passed to the material even if they are
278 * not explicitly used by a glTF primitive, but the primitive may lack the
279 * corresponding sets of texture coordinates intended to sample them.
280 */
281 UPROPERTY(
282 EditAnywhere,
283 Category = "Cesium|Metadata",
284 Meta = (TitleProperty = "Name"))
285 TSet<FString> PropertyTextureNames;
286};
287
288/**
289 * @brief Description of metadata from a glTF's EXT_structural_metadata
290 * extension that should be uploaded to the GPU for access in Unreal materials.
291 */
292USTRUCT()
293struct CESIUMRUNTIME_API FCesiumModelMetadataDescription {
294 GENERATED_USTRUCT_BODY()
295
296 /**
297 * @brief Descriptions of property tables to encode for access in Unreal
298 * materials.
299 */
300 UPROPERTY(
301 EditAnywhere,
302 Category = "Cesium|Metadata",
303 Meta = (TitleProperty = "Name"))
305
306 /**
307 * @brief Descriptions of property textures to make accessible to Unreal
308 * materials.
309 */
310 UPROPERTY(
311 EditAnywhere,
312 Category = "Cesium|Metadata",
313 Meta = (TitleProperty = "Name"))
315};
316
317#pragma endregion
318
319#pragma region Tileset Statistics
320
321/**
322 * @brief Supported statistic semantics from the 3D Tiles specification.
323 */
324UENUM()
326 None = 0 UMETA(Hidden),
327 /**
328 * The minimum property value occurring in the tileset.
329 */
331 /**
332 * The maximum property value occurring in the tileset.
333 */
335 /**
336 * The arithmetic mean of property values occurring in the tileset.
337 */
339 /**
340 * The median of property values occurring in the tileset.
341 */
343 /**
344 * The standard deviation of property values occurring in the tileset.
345 */
347 /**
348 * The variance of property values occurring in the tileset.
349 */
351 /**
352 * The sum of property values occurring in the tileset.
353 */
355};
356
357/**
358 * @brief A statistic for a metadata property's values.
359 */
360USTRUCT()
362 GENERATED_USTRUCT_BODY()
363 /**
364 * @brief The semantic of this statistic.
365 */
366 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata|Statistics")
368
369 /**
370 * @brief The value of this statistic. This reflects the value on the tileset
371 * it is attached to and should not be edited by users.
372 */
373 UPROPERTY(Transient, VisibleAnywhere, Category = "Cesium|Metadata|Statistics")
375};
376
377/**
378 * @brief The statistics for a given metadata property.
379 */
380USTRUCT()
382 GENERATED_USTRUCT_BODY()
383 /**
384 * @brief The identifier of this property.
385 */
386 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata|Statistics")
387 FString Id;
388
389 /**
390 * @brief The available statistics for this property.
391 */
392 UPROPERTY(
393 EditAnywhere,
394 Category = "Cesium|Metadata|Statistics",
395 Meta = (TitleProperty = "Semantic"))
397};
398
399/**
400 * @brief The statistics for a given metadata class.
401 */
402USTRUCT()
404 GENERATED_USTRUCT_BODY()
405 /**
406 * @brief The identifier of this class.
407 */
408 UPROPERTY(EditAnywhere, Category = "Cesium|Metadata|Statistics")
409 FString Id;
410
411 /**
412 * @brief The statistics of properties belonging to this class.
413 */
414 UPROPERTY(
415 EditAnywhere,
416 Category = "Cesium|Metadata|Statistics",
417 Meta = (TitleProperty = "Id"))
419};
420
421#pragma endregion
422
423/**
424 * @brief Description of both feature IDs and metadata from a glTF via the
425 * EXT_mesh_features and EXT_structural_metadata extensions. Indicates what
426 * parts of the extension should be uploaded to the GPU for access in Unreal
427 * materials.
428 */
429USTRUCT()
430struct CESIUMRUNTIME_API FCesiumFeaturesMetadataDescription {
431 GENERATED_USTRUCT_BODY()
432
433public:
434 /**
435 * @brief Description of the statistics reported by the tileset. Each entry
436 * represents a class and its cumulative statistics.
437 */
438 UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Id"))
440
441 /**
442 * @brief Description of the feature ID sets available from the
443 * EXT_mesh_features or EXT_instance_features extensions in a glTF.
444 */
445 UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Name"))
447
448 /**
449 * @brief Description of the metadata used by the EXT_structural_metadata on a
450 * glTF's primitives.
451 */
452 UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Name"))
454
455 /**
456 * @brief Description of metadata from a glTF's EXT_structural_metadata
457 * extension.
458 */
459 UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Name"))
461};
@ UMETA
The tileset will be loaded from Cesium Ion using the provided IonAssetID and IonAccessToken.
ECesiumFeatureIdSetType
The type of a feature ID set.
ECesiumMetadataStatisticSemantic
Supported statistic semantics from the 3D Tiles specification.
@ Mean
The arithmetic mean of property values occurring in the tileset.
@ Median
The median of property values occurring in the tileset.
@ StandardDeviation
The standard deviation of property values occurring in the tileset.
@ Max
The maximum property value occurring in the tileset.
@ Variance
The variance of property values occurring in the tileset.
@ Min
The minimum property value occurring in the tileset.
@ Sum
The sum of property values occurring in the tileset.
USTRUCT() struct FCesiumVoxelClassDescription
Description of the metadata properties available in the class used by the 3DTILES_content_voxels exte...
Description of a feature ID set from either EXT_mesh_features or EXT_instance_features.
FString PropertyTableName
The name of the property table that this feature ID set corresponds to.
ECesiumFeatureIdSetType Type
The type of the feature ID set.
FString Name
The display name of the feature ID set.
Description of both feature IDs and metadata from a glTF via the EXT_mesh_features and EXT_structural...
TArray< FCesiumMetadataClassStatisticsDescription > Statistics
Description of the statistics reported by the tileset.
FCesiumPrimitiveMetadataDescription PrimitiveMetadata
Description of the metadata used by the EXT_structural_metadata on a glTF's primitives.
FCesiumPrimitiveFeaturesDescription PrimitiveFeatures
Description of the feature ID sets available from the EXT_mesh_features or EXT_instance_features exte...
FCesiumModelMetadataDescription ModelMetadata
Description of metadata from a glTF's EXT_structural_metadata extension.
TArray< FCesiumMetadataPropertyStatisticsDescription > Properties
The statistics of properties belonging to this class.
Describes how a property from EXT_structural_metadata will be encoded for access in Unreal materials.
Represents information about a metadata property according to how the property is defined in EXT_stru...
A statistic for a metadata property's values.
ECesiumMetadataStatisticSemantic Semantic
The semantic of this statistic.
FCesiumMetadataValue Value
The value of this statistic.
The statistics for a given metadata property.
TArray< FCesiumMetadataPropertyStatisticValue > Values
The available statistics for this property.
A Blueprint-accessible wrapper for a glTF metadata value.
Description of metadata from a glTF's EXT_structural_metadata extension that should be uploaded to th...
TArray< FCesiumPropertyTableDescription > PropertyTables
Descriptions of property tables to encode for access in Unreal materials.
TArray< FCesiumPropertyTextureDescription > PropertyTextures
Descriptions of property textures to make accessible to Unreal materials.
Description of the feature ID sets available from the EXT_mesh_features and EXT_instance_features ext...
TArray< FCesiumFeatureIdSetDescription > FeatureIdSets
The feature ID sets to make accessible to the material.
Names of the metadata entities referenced by the EXT_structural_metadata on a glTF's primitives.
TSet< FString > PropertyTextureNames
The names of the property textures used by the glTF primitives across the tileset.
Description of a property attribute with properties that should be made accessible to Unreal material...
TArray< FCesiumPropertyAttributePropertyDescription > Properties
Descriptions of the properties to upload to the GPU.
FString Name
The name of this property attribute.
Description of a property attribute property that should be encoded for access on the GPU.
FCesiumMetadataPropertyDetails PropertyDetails
Describes the underlying type of this property and other relevant information from its EXT_structural...
FCesiumMetadataEncodingDetails EncodingDetails
Describes how the property will be encoded as data on the GPU, if possible.
Description of a property table containing properties to be encoded for access in Unreal materials.
TArray< FCesiumPropertyTablePropertyDescription > Properties
Descriptions of the properties to upload to the GPU.
FString Name
The name of this property table.
Description of a property table property that should be encoded for access on the GPU.
FCesiumMetadataPropertyDetails PropertyDetails
Describes the underlying type of this property and other relevant information from its EXT_structural...
FCesiumMetadataEncodingDetails EncodingDetails
Describes how the property will be encoded as data on the GPU, if possible.
Description of a property texture with properties that should be made accessible to Unreal materials.
TArray< FCesiumPropertyTexturePropertyDescription > Properties
Descriptions of the properties to upload to the GPU.
FString Name
The name of this property texture.
Description of a property texture property that should be made accessible to Unreal materials.
FCesiumMetadataPropertyDetails PropertyDetails
Describes the underlying type of this property and other relevant information from its EXT_structural...