Download LyraStarterGame/Source/LyraGame/Camera/LyraCameraComponent.h from Alexhas2/unitysamples: direct link, hf CLI and curl.
- Browser
- Download file 2.12 kB
-
https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Camera/LyraCameraComponent.h
- Command line
-
hf download hf://datasets/Alexhas2/unitysamples/LyraStarterGame/Source/LyraGame/Camera/LyraCameraComponent.h
-
curl -L -o LyraCameraComponent.h https://huggingface.co/datasets/Alexhas2/unitysamples/resolve/main/LyraStarterGame/Source/LyraGame/Camera/LyraCameraComponent.h
2.12 kB
| // Copyright Epic Games, Inc. All Rights Reserved. | |
| class UCanvas; | |
| class ULyraCameraMode; | |
| class ULyraCameraModeStack; | |
| class UObject; | |
| struct FFrame; | |
| struct FGameplayTag; | |
| struct FMinimalViewInfo; | |
| template <class TClass> class TSubclassOf; | |
| DECLARE_DELEGATE_RetVal(TSubclassOf<ULyraCameraMode>, FLyraCameraModeDelegate); | |
| /** | |
| * ULyraCameraComponent | |
| * | |
| * The base camera component class used by this project. | |
| */ | |
| UCLASS() | |
| class ULyraCameraComponent : public UCameraComponent | |
| { | |
| GENERATED_BODY() | |
| public: | |
| ULyraCameraComponent(const FObjectInitializer& ObjectInitializer); | |
| // Returns the camera component if one exists on the specified actor. | |
| UFUNCTION(BlueprintPure, Category = "Lyra|Camera") | |
| static ULyraCameraComponent* FindCameraComponent(const AActor* Actor) { return (Actor ? Actor->FindComponentByClass<ULyraCameraComponent>() : nullptr); } | |
| // Returns the target actor that the camera is looking at. | |
| virtual AActor* GetTargetActor() const { return GetOwner(); } | |
| // Delegate used to query for the best camera mode. | |
| FLyraCameraModeDelegate DetermineCameraModeDelegate; | |
| // Add an offset to the field of view. The offset is only for one frame, it gets cleared once it is applied. | |
| void AddFieldOfViewOffset(float FovOffset) { FieldOfViewOffset += FovOffset; } | |
| virtual void DrawDebug(UCanvas* Canvas) const; | |
| // Gets the tag associated with the top layer and the blend weight of it | |
| void GetBlendInfo(float& OutWeightOfTopLayer, FGameplayTag& OutTagOfTopLayer) const; | |
| protected: | |
| virtual void OnRegister() override; | |
| virtual void GetCameraView(float DeltaTime, FMinimalViewInfo& DesiredView) override; | |
| virtual void UpdateCameraModes(); | |
| protected: | |
| // Stack used to blend the camera modes. | |
| UPROPERTY() | |
| TObjectPtr<ULyraCameraModeStack> CameraModeStack; | |
| // Offset applied to the field of view. The offset is only for one frame, it gets cleared once it is applied. | |
| float FieldOfViewOffset; | |
| }; | |