Cesium for Unreal 2.24.1
Loading...
Searching...
No Matches
CesiumMetadataComponent.h
Go to the documentation of this file.
1// Copyright 2020-2026 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "Components/ActorComponent.h"
6
7#include "CesiumMetadataComponent.generated.h"
8
10
11namespace Cesium3DTilesSelection {
12class TilesetMetadata;
13}
14
15/**
16 * @brief A base component interface for interacting with metadata in a
17 * Cesium3DTileset.
18 */
19UCLASS(ClassGroup = Cesium, Meta = (BlueprintSpawnableComponent))
20class CESIUMRUNTIME_API UCesiumMetadataComponent : public UActorComponent {
21 GENERATED_BODY()
22
23public:
24 /**
25 * Syncs this component's statistics description from its tileset owner,
26 * retrieving values for the corresponding semantics.
27 *
28 * If there are described statistics that are not present on the tileset
29 * owner, they will be left as null values.
30 */
32
33 /**
34 * Whether a sync is already in progress.
35 */
36 bool IsSyncing() const;
37
38 /**
39 * Interrupts any sync happening on this component. Usually called before
40 * destroying or refreshing a tileset.
41 */
43
44protected:
45 /**
46 * Event that occurs once metadata is successfully synced from the tileset
47 * during SyncStatistics. Derived classes must override this to make use of
48 * the results.
49 */
50 virtual void OnFetchMetadata(
51 ACesium3DTileset* pActor,
53
54 /**
55 * Called during various parts of the sync process. Derived classes must
56 * override this.
57 */
58 virtual void ClearStatistics();
59
60 // Called when a component is registered. This seems to be the best way to
61 // intercept when the component is pasted (to then update its statistics).
62 virtual void OnRegister() override;
63
64private:
65 bool _syncInProgress;
66};
A base component interface for interacting with metadata in a Cesium3DTileset.
void SyncStatistics()
Syncs this component's statistics description from its tileset owner, retrieving values for the corre...
virtual void OnRegister() override
bool IsSyncing() const
Whether a sync is already in progress.
virtual void ClearStatistics()
Called during various parts of the sync process.
void InterruptSync()
Interrupts any sync happening on this component.
virtual void OnFetchMetadata(ACesium3DTileset *pActor, const Cesium3DTilesSelection::TilesetMetadata *pMetadata)
Event that occurs once metadata is successfully synced from the tileset during SyncStatistics.