Cesium for Unreal 2.15.0
Loading...
Searching...
No Matches
CesiumPolygonRasterOverlay.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
6#include "CoreMinimal.h"
7#include "CesiumPolygonRasterOverlay.generated.h"
8
10
11namespace Cesium3DTilesSelection {
13}
14
15/**
16 * A raster overlay that rasterizes polygons and drapes them over the tileset.
17 * This is useful for clipping out parts of a tileset, for adding a water effect
18 * in an area, and for many other purposes.
19 */
20UCLASS(ClassGroup = Cesium, meta = (BlueprintSpawnableComponent))
21class CESIUMRUNTIME_API UCesiumPolygonRasterOverlay
22 : public UCesiumRasterOverlay {
23 GENERATED_BODY()
24
25public:
27
28 /**
29 * The polygons to rasterize for this overlay.
30 */
31 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
32 TArray<TSoftObjectPtr<ACesiumCartographicPolygon>> Polygons;
33
34 /**
35 * Whether to invert the selection specified by the polygons.
36 *
37 * If this is true, only the areas outside of all the polygons will be
38 * rasterized.
39 */
40 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
41 bool InvertSelection = false;
42
43 /**
44 * Whether tiles that fall entirely within the rasterized selection should be
45 * excluded from loading and rendering. For better performance, this should be
46 * enabled when this overlay will be used for clipping. But when this overlay
47 * is used for other effects, this option should be disabled to avoid missing
48 * tiles.
49 *
50 * Note that if InvertSelection is true, this will cull tiles that are
51 * outside of all the polygons. If it is false, this will cull tiles that are
52 * completely inside at least one polygon.
53 */
54 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
56
57protected:
58 virtual std::unique_ptr<CesiumRasterOverlays::RasterOverlay> CreateOverlay(
59 const CesiumRasterOverlays::RasterOverlayOptions& options = {}) override;
60
61 virtual void OnAdd(
63 CesiumRasterOverlays::RasterOverlay* pOverlay) override;
64 virtual void OnRemove(
66 CesiumRasterOverlays::RasterOverlay* pOverlay) override;
67
68private:
69 std::shared_ptr<Cesium3DTilesSelection::RasterizedPolygonsTileExcluder>
70 _pExcluder;
71};
A spline-based polygon actor used to rasterize 2D polygons on top of Cesium 3D Tileset actors.
bool ExcludeSelectedTiles
Whether tiles that fall entirely within the rasterized selection should be excluded from loading and ...
bool InvertSelection
Whether to invert the selection specified by the polygons.
virtual void OnRemove(Cesium3DTilesSelection::Tileset *pTileset, CesiumRasterOverlays::RasterOverlay *pOverlay) override
virtual void OnAdd(Cesium3DTilesSelection::Tileset *pTileset, CesiumRasterOverlays::RasterOverlay *pOverlay) override
virtual std::unique_ptr< CesiumRasterOverlays::RasterOverlay > CreateOverlay(const CesiumRasterOverlays::RasterOverlayOptions &options={}) override
TArray< TSoftObjectPtr< ACesiumCartographicPolygon > > Polygons
The polygons to rasterize for this overlay.
STL namespace.