Cesium for Unreal 2.13.2
Loading...
Searching...
No Matches
CesiumCartographicPolygon.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
6#include "CesiumGeospatial/CartographicPolygon.h"
7#include "CesiumGeospatial/GlobeRectangle.h"
9#include "Components/SplineComponent.h"
10#include "CoreMinimal.h"
11#include "Engine/StaticMesh.h"
12#include "GameFramework/Actor.h"
13#include <vector>
14
15#include "CesiumCartographicPolygon.generated.h"
16
17/**
18 * A spline-based polygon actor used to rasterize 2D polygons on top of
19 * Cesium 3D Tileset actors.
20 */
21UCLASS(ClassGroup = Cesium, meta = (BlueprintSpawnableComponent))
22class CESIUMRUNTIME_API ACesiumCartographicPolygon : public AActor {
23
24 GENERATED_BODY()
25
26public:
28
29 /**
30 * The polygon.
31 */
32 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Cesium")
33 USplineComponent* Polygon;
34
35 /**
36 * The Globe Anchor Component that precisely ties this Polygon to the Globe.
37 */
38 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Cesium")
40
41 virtual void OnConstruction(const FTransform& Transform) override;
42
43 /**
44 * Creates and returns a CartographicPolygon object
45 * created from the current spline selection.
46 *
47 * @param worldToTileset The transformation from Unreal world coordinates to
48 * the coordinates of the Cesium3DTileset Actor for which the cartographic
49 * polygon is being created.
50 */
51 CesiumGeospatial::CartographicPolygon
52 CreateCartographicPolygon(const FTransform& worldToTileset) const;
53
54 // AActor overrides
55 virtual void PostLoad() override;
56
57protected:
58 virtual void BeginPlay() override;
59
60private:
61 void MakeLinear();
62};
A spline-based polygon actor used to rasterize 2D polygons on top of Cesium 3D Tileset actors.
This component can be added to a movable actor to anchor it to the globe and maintain precise placeme...