初始提交: UE5.3项目基础框架

This commit is contained in:
2025-10-14 11:14:54 +08:00
commit 721d9fd98e
5334 changed files with 316782 additions and 0 deletions

View File

@ -0,0 +1,62 @@
// Copyright 2020-2024 CesiumGS, Inc. and Contributors
#pragma once
#include "CesiumGeoreference.h"
#include "CesiumGeospatial/CartographicPolygon.h"
#include "CesiumGeospatial/GlobeRectangle.h"
#include "CesiumGlobeAnchorComponent.h"
#include "Components/SplineComponent.h"
#include "CoreMinimal.h"
#include "Engine/StaticMesh.h"
#include "GameFramework/Actor.h"
#include <vector>
#include "CesiumCartographicPolygon.generated.h"
/**
* A spline-based polygon actor used to rasterize 2D polygons on top of
* Cesium 3D Tileset actors.
*/
UCLASS(ClassGroup = (Cesium), meta = (BlueprintSpawnableComponent))
class CESIUMRUNTIME_API ACesiumCartographicPolygon : public AActor {
GENERATED_BODY()
public:
ACesiumCartographicPolygon();
/**
* The polygon.
*/
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Cesium")
USplineComponent* Polygon;
/**
* The Globe Anchor Component that precisely ties this Polygon to the Globe.
*/
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Cesium")
UCesiumGlobeAnchorComponent* GlobeAnchor;
virtual void OnConstruction(const FTransform& Transform) override;
/**
* Creates and returns a CartographicPolygon object
* created from the current spline selection.
*
* @param worldToTileset The transformation from Unreal world coordinates to
* the coordinates of the Cesium3DTileset Actor for which the cartographic
* polygon is being created.
*/
CesiumGeospatial::CartographicPolygon
CreateCartographicPolygon(const FTransform& worldToTileset) const;
// AActor overrides
virtual void PostLoad() override;
protected:
virtual void BeginPlay() override;
private:
void MakeLinear();
};