Cesium for Unreal 2.13.2
Loading...
Searching...
No Matches
CesiumWgs84Ellipsoid.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "CesiumRuntime.h"
6#include "Kismet/BlueprintFunctionLibrary.h"
7#include "Misc/Optional.h"
8#include "CesiumWgs84Ellipsoid.generated.h"
9
10UCLASS()
11class CESIUMRUNTIME_API UCesiumWgs84Ellipsoid
12 : public UBlueprintFunctionLibrary {
13 GENERATED_BODY()
14
15public:
16 /**
17 * Gets the radii of the WGS84 ellipsoid in its x-, y-, and z-directions in
18 * meters.
19 */
20 UFUNCTION(BlueprintPure, Category = "Cesium|Ellipsoid|WGS84")
21 static FVector GetRadii();
22
23 /**
24 * Gets the maximum radius of the WGS84 ellipsoid in any dimension, in meters.
25 */
26 UFUNCTION(BlueprintPure, Category = "Cesium|Ellipsoid|WGS84")
27 static double GetMaximumRadius();
28
29 /**
30 * Gets the minimum radius of the WGS854 ellipsoid in any dimension, in
31 * meters.
32 */
33 UFUNCTION(BlueprintPure, Category = "Cesium|Ellipsoid|WGS84")
34 static double GetMinimumRadius();
35
36 /**
37 * Scale the given Earth-Centered, Earth-Fixed position along the geodetic
38 * surface normal so that it is on the surface of the ellipsoid. If the
39 * position is near the center of the ellipsoid, the result will have the
40 * value (0,0,0) because the surface position is undefined.
41 */
42 UFUNCTION(
43 BlueprintPure,
44 Category = "Cesium|Ellipsoid|WGS84",
45 meta = (ReturnDisplayName = "SurfacePosition"))
46 static FVector
47 ScaleToGeodeticSurface(const FVector& EarthCenteredEarthFixedPosition);
48
49 /**
50 * Computes the normal of the plane tangent to the surface of the ellipsoid
51 * at the provided Earth-Centered, Earth-Fixed position.
52 */
53 UFUNCTION(
54 BlueprintPure,
55 Category = "Cesium|Ellipsoid|WGS84",
56 meta = (ReturnDisplayName = "SurfaceNormalVector"))
57 static FVector
58 GeodeticSurfaceNormal(const FVector& EarthCenteredEarthFixedPosition);
59
60 /**
61 * Convert longitude in degrees (X), latitude in degrees (Y), and height above
62 * the WGS84 ellipsoid in meters (Z) to Earth-Centered, Earth-Fixed (ECEF)
63 * coordinates.
64 */
65 UFUNCTION(
66 BlueprintPure,
67 Category = "Cesium|Ellipsoid|WGS84",
68 meta = (ReturnDisplayName = "EarthCenteredEarthFixedPosition"))
69 static FVector LongitudeLatitudeHeightToEarthCenteredEarthFixed(
70 const FVector& LongitudeLatitudeHeight);
71
72 /**
73 * Convert Earth-Centered, Earth-Fixed (ECEF) coordinates to longitude in
74 * degrees (X), latitude in degrees (Y), and height above the WGS84 ellipsoid
75 * in meters (Z). If the position is near the center of the Earth, the result
76 * will have the value (0,0,0) because the longitude, latitude, and height are
77 * undefined.
78 */
79 UFUNCTION(
80 BlueprintPure,
81 Category = "Cesium|Ellipsoid|WGS84",
82 meta = (ReturnDisplayName = "LongitudeLatitudeHeight"))
83 static FVector EarthCenteredEarthFixedToLongitudeLatitudeHeight(
84 const FVector& EarthCenteredEarthFixedPosition);
85
86 /**
87 * Computes the transformation matrix from the local East-North-Up (ENU) frame
88 * to Earth-Centered, Earth-Fixed (ECEF) at the specified ECEF location.
89 */
90 static FMatrix EastNorthUpToEarthCenteredEarthFixed(
91 const FVector& EarthCenteredEarthFixedPosition);
92};