Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
CesiumCameraManager.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "CesiumCamera.h"
6#include "Containers/Map.h"
7#include "GameFramework/Actor.h"
8
9#include "CesiumCameraManager.generated.h"
10
15UCLASS()
16class CESIUMRUNTIME_API ACesiumCameraManager : public AActor {
17 GENERATED_BODY()
18
19public:
23 UFUNCTION(
24 BlueprintCallable,
25 Category = "CesiumCameraManager",
26 meta = (WorldContext = "WorldContextObject"))
28 GetDefaultCameraManager(const UObject* WorldContextObject);
29
31
39 UFUNCTION(BlueprintCallable, Category = "Cesium")
40 int32 AddCamera(UPARAM(ref) const FCesiumCamera& Camera);
41
50 UFUNCTION(BlueprintCallable, Category = "Cesium")
51 bool RemoveCamera(int32 CameraId);
52
62 UFUNCTION(BlueprintCallable, Category = "Cesium")
63 bool UpdateCamera(int32 CameraId, UPARAM(ref) const FCesiumCamera& Camera);
64
68 UFUNCTION(BlueprintCallable, Category = "Cesium")
69 const TMap<int32, FCesiumCamera>& GetCameras() const;
70
71 virtual bool ShouldTickIfViewportsOnly() const override;
72
73 virtual void Tick(float DeltaTime) override;
74
75private:
76 int32 _currentCameraId = 0;
77 TMap<int32, FCesiumCamera> _cameras;
78
79 static FName DEFAULT_CAMERAMANAGER_TAG;
80};
Manages custom FCesiumCameras for all ACesium3DTilesets in the world.
static ACesiumCameraManager * GetDefaultCameraManager(const UObject *WorldContextObject)
Get the camera manager for this world.
A camera description that ACesium3DTilesets can use to decide what tiles need to be loaded to suffici...