Cesium for Unreal 2.15.0
Loading...
Searching...
No Matches
CesiumCamera.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "Math/Rotator.h"
6#include "Math/Vector.h"
7#include "Math/Vector2D.h"
8#include "UObject/ObjectMacros.h"
9
10#include "Cesium3DTilesSelection/ViewState.h"
11
12#include "CesiumCamera.generated.h"
13
14/**
15 * @brief A camera description that {@link ACesium3DTileset}s can use to decide
16 * what tiles need to be loaded to sufficiently cover the camera view.
17 */
18USTRUCT(BlueprintType)
19struct CESIUMRUNTIME_API FCesiumCamera {
20 GENERATED_USTRUCT_BODY()
21
22public:
23 /**
24 * @brief The pixel dimensions of the viewport.
25 */
26 UPROPERTY(BlueprintReadWrite, Category = "Cesium")
27 FVector2D ViewportSize;
28
29 /**
30 * @brief The Unreal location of the camera.
31 */
32 UPROPERTY(BlueprintReadWrite, Category = "Cesium")
33 FVector Location;
34
35 /**
36 * @brief The Unreal rotation of the camera.
37 */
38 UPROPERTY(BlueprintReadWrite, Category = "Cesium")
39 FRotator Rotation;
40
41 /**
42 * @brief The horizontal field of view of the camera in degrees.
43 */
44 UPROPERTY(BlueprintReadWrite, Category = "Cesium")
46
47 /**
48 * @brief The overriden aspect ratio for this camera.
49 *
50 * When this is 0.0f, use the aspect ratio implied by ViewportSize.
51 *
52 * This may be different from the aspect ratio implied by the ViewportSize
53 * and black bars are added as needed in order to achieve this aspect ratio
54 * within a larger viewport.
55 */
56 UPROPERTY(BlueprintReadWrite, Category = "Cesium")
57 double OverrideAspectRatio = 0.0;
58
59 /**
60 * @brief Construct an uninitialized FCesiumCamera object.
61 */
63
64 /**
65 * @brief Construct a new FCesiumCamera object.
66 *
67 * @param ViewportSize The viewport pixel size.
68 * @param Location The Unreal location.
69 * @param Rotation The Unreal rotation.
70 * @param FieldOfViewDegrees The horizontal field of view in degrees.
71 */
73 const FVector2D& ViewportSize,
74 const FVector& Location,
75 const FRotator& Rotation,
76 double FieldOfViewDegrees);
77
78 /**
79 * @brief Construct a new FCesiumCamera object.
80 *
81 * @param ViewportSize The viewport pixel size.
82 * @param Location The Unreal location.
83 * @param Rotation The Unreal rotation.
84 * @param FieldOfViewDegrees The horizontal field of view in degrees.
85 * @param OverrideAspectRatio The overriden aspect ratio.
86 */
88 const FVector2D& ViewportSize,
89 const FVector& Location,
90 const FRotator& Rotation,
91 double FieldOfViewDegrees,
92 double OverrideAspectRatio);
93};
double OverrideAspectRatio
The overriden aspect ratio for this camera.
FVector Location
The Unreal location of the camera.
FRotator Rotation
The Unreal rotation of the camera.
FVector2D ViewportSize
The pixel dimensions of the viewport.
double FieldOfViewDegrees
The horizontal field of view of the camera in degrees.
FCesiumCamera()
Construct an uninitialized FCesiumCamera object.