UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CameraStackTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "CameraStackTypes.generated.h"
8
10
11// NOTE:
12// This code is work in progress - do not use these types until this comment is removed.
13
14USTRUCT()
19
20
21//@TODO: Document
22UENUM()
24{
25 enum Type : int
26 {
27 CABM_Linear UMETA(DisplayName="Linear"),
28 CABM_Cubic UMETA(DisplayName="Cubic")
29 };
30}
31
32// Used to update camera entries in the camera stack
34{
35private:
36 float TrueCurrentWeight;
37 float NonDebugCurrentWeight;
38 float DeltaTime;
40
41public:
43 : TrueCurrentWeight(1.0f)
44 , NonDebugCurrentWeight(1.0f)
45 , DeltaTime(InDeltaTime)
46 , Camera(InCamera)
47 {
48 }
49
51 {
52 FCameraUpdateContext Result(Camera, DeltaTime);
53 Result.TrueCurrentWeight = TrueCurrentWeight * Multiplier;
54 Result.NonDebugCurrentWeight = NonDebugCurrentWeight * (bFromDebugNode ? 1.0f : Multiplier);
55
56 return Result;
57 }
58
59 // Returns the final blend weight contribution for this stage
60 float GetTrueWeight() const { return TrueCurrentWeight; }
61
62 // Returns the final blend weight contribution for this stage (ignoring debug cameras)
63 float GetNonDebugWeight() const { return NonDebugCurrentWeight; }
64
65 // Returns the delta time for this update, in seconds
66 float GetDeltaTime() const { return DeltaTime; }
67
68 // Returns the camera stack
69 //@TODO: Hack to work around current view target construction...
70 APlayerCameraManager* GetCameraManager() const { return Camera; }
71};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UMETA(...)
Definition ObjectMacros.h:747
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
@ Multiplier
Definition PlayerCameraManager.h:189
Definition CameraStackTypes.h:24
Type
Definition CameraStackTypes.h:26
Definition CameraStackTypes.h:34
float GetTrueWeight() const
Definition CameraStackTypes.h:60
FCameraUpdateContext FractionalWeight(float Multiplier, bool bFromDebugNode) const
Definition CameraStackTypes.h:50
APlayerCameraManager * GetCameraManager() const
Definition CameraStackTypes.h:70
float GetDeltaTime() const
Definition CameraStackTypes.h:66
FCameraUpdateContext(APlayerCameraManager *InCamera, float InDeltaTime)
Definition CameraStackTypes.h:42
float GetNonDebugWeight() const
Definition CameraStackTypes.h:63
Definition CameraStackTypes.h:16