Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
CesiumEllipsoid.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "Engine/DataAsset.h"
6#include "Misc/Optional.h"
7#include <CesiumGeospatial/LocalHorizontalCoordinateSystem.h>
8#include "CesiumEllipsoid.generated.h"
9
10namespace CesiumGeospatial {
11class Ellipsoid;
12};
13
14UCLASS()
15class CESIUMRUNTIME_API UCesiumEllipsoid : public UDataAsset {
16 GENERATED_BODY()
17
18public:
28 UFUNCTION(BlueprintCallable, Category = "Cesium|Ellipsoid")
29 static UCesiumEllipsoid* Create(const FVector& Radii);
30
35 UFUNCTION(BlueprintPure, Category = "Cesium|Ellipsoid")
36 FVector GetRadii();
37
44 void SetRadii(const FVector& NewRadii);
45
49 UFUNCTION(BlueprintPure, Category = "Cesium|Ellipsoid")
50 double GetMaximumRadius();
51
56 UFUNCTION(BlueprintPure, Category = "Cesium|Ellipsoid")
57 double GetMinimumRadius();
58
65 UFUNCTION(
66 BlueprintPure,
67 Category = "Cesium|Ellipsoid",
68 meta = (ReturnDisplayName = "SurfacePosition"))
69 FVector
70 ScaleToGeodeticSurface(const FVector& EarthCenteredEarthFixedPosition);
71
76 UFUNCTION(
77 BlueprintPure,
78 Category = "Cesium|Ellipsoid",
79 meta = (ReturnDisplayName = "SurfaceNormalVector"))
80 FVector GeodeticSurfaceNormal(const FVector& EarthCenteredEarthFixedPosition);
81
87 UFUNCTION(
88 BlueprintPure,
89 Category = "Cesium|Ellipsoid",
90 meta = (ReturnDisplayName = "EarthCenteredEarthFixedPosition"))
91 FVector LongitudeLatitudeHeightToEllipsoidCenteredEllipsoidFixed(
92 const FVector& LongitudeLatitudeHeight);
93
101 UFUNCTION(
102 BlueprintPure,
103 Category = "Cesium|Ellipsoid",
104 meta = (ReturnDisplayName = "LongitudeLatitudeHeight"))
105 FVector EllipsoidCenteredEllipsoidFixedToLongitudeLatitudeHeight(
106 const FVector& EarthCenteredEarthFixedPosition);
107
113 FMatrix EastNorthUpToEllipsoidCenteredEllipsoidFixed(
114 const FVector& EarthCenteredEarthFixedPosition);
115
120 CesiumGeospatial::LocalHorizontalCoordinateSystem
121 CreateCoordinateSystem(const FVector& Center, double Scale);
122
126 const CesiumGeospatial::Ellipsoid& GetNativeEllipsoid();
127
128protected:
135 UPROPERTY(
136 EditAnywhere,
137 Category = "Cesium|Ellipsoid",
138 meta = (DisplayName = "Radii"))
139 FVector Radii;
140
141private:
142#if WITH_EDITOR
143 virtual void
144 PostSaveRoot(FObjectPostSaveRootContext ObjectSaveContext) override;
145#endif
146
147 TOptional<CesiumGeospatial::Ellipsoid> NativeEllipsoid;
148};