Cesium for Unreal 2.13.2
Loading...
Searching...
No Matches
CesiumTileExcluder.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4#include "CesiumTile.h"
5#include "CoreMinimal.h"
6#include "CesiumTileExcluder.generated.h"
7
8class CesiumTileExcluderAdapter;
9
10/**
11 * An actor component for excluding Cesium Tiles.
12 * This class provides an interface for excluding Cesium Tiles from a tileset.
13 * You can create a blueprint that derives from this class and override the
14 * `ShouldExclude` function to implement custom logic for determining whether a
15 * tile should be excluded. This function can be implemented in either C++ or
16 * Blueprints.
17 */
18UCLASS(
19 ClassGroup = (Cesium),
20 meta = (BlueprintSpawnableComponent),
22 Abstract)
23class CESIUMRUNTIME_API UCesiumTileExcluder : public UActorComponent {
24 GENERATED_BODY()
25private:
26 CesiumTileExcluderAdapter* pExcluderAdapter;
27
28 UPROPERTY()
29 UCesiumTile* CesiumTile;
30
31public:
32 UCesiumTileExcluder(const FObjectInitializer& ObjectInitializer);
33
34 virtual void Activate(bool bReset) override;
35 virtual void Deactivate() override;
36 virtual void OnComponentDestroyed(bool bDestroyingHierarchy) override;
37
38#if WITH_EDITOR
39 // Called when properties are changed in the editor
40 virtual void
41 PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
42#endif
43
44 /**
45 * Adds this tile excluder to its owning Cesium 3D Tileset Actor. If the
46 * excluder is already added or if this component's Owner is not a Cesium 3D
47 * Tileset, this method does nothing.
48 */
49 UFUNCTION(BlueprintCallable, Category = "Cesium")
50 void AddToTileset();
51
52 /**
53 * Removes this tile excluder from its owning Cesium 3D Tileset Actor. If the
54 * excluder is not yet added or if this component's Owner is not a Cesium 3D
55 * Tileset, this method does nothing.
56 */
57 UFUNCTION(BlueprintCallable, Category = "Cesium")
58 void RemoveFromTileset();
59
60 /**
61 * Refreshes this tile excluderby removing from its owning Cesium 3D Tileset
62 * Actor and re-adding it. If this component's Owner is not a Cesium 3D
63 * Tileset Actor, this method does nothing.
64 */
65 UFUNCTION(BlueprintCallable, Category = "Cesium")
66 void Refresh();
67
68 /**
69 * Determines whether a tile should be excluded.
70 * This function is called to determine whether a tile should be excluded from
71 * the tileset. You can override this function in a derived class or blueprint
72 * to implement custom exclusion logic.
73 */
74 UFUNCTION(BlueprintNativeEvent)
75 bool ShouldExclude(const UCesiumTile* TileObject);
76};
Blueprintable
virtual void Deactivate() override
virtual void Activate(bool bReset) override
UCesiumTileExcluder(const FObjectInitializer &ObjectInitializer)
virtual void OnComponentDestroyed(bool bDestroyingHierarchy) override
A UObject representation of a Cesium Tile.
Definition CesiumTile.h:17