Projekt for SPIE - Avatar for safety briefing / managment event
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.8 KiB

// Copyright Voulz 2021-2025. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Components/SceneCaptureComponent2D.h"
#include "ArchVisSceneCaptureComponent2D.generated.h"
/**
* An experimental SceneCaptureComponent working with an ArchVisCamera.
* Works a bit differently than a regular SceneCaptureComponent as you have to link the camera to render via the ArchVisCineCameraActor or the ArchVisCineCameraComponent properties
*/
UCLASS(hidecategories = (Collision, Object, Physics, SceneComponent, CaptureComponent2D), ClassGroup = Rendering, EditInlineNew, meta = (BlueprintSpawnableComponent))
class ARCHVISTOOLS_API UArchVisSceneCaptureComponent2D : public USceneCaptureComponent2D
{
GENERATED_BODY()
public:
/** The Component to get the view from. If not set, it will look if the property AArchVisCineCameraActor is set. */
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="ArchVis")
TSoftObjectPtr<class UArchVisCineCameraComponent> ArchVisCineCameraComponent;
/** If the property ArchVisCineCameraComponent is not set, it will access this property to get the view from. If not set, it will look at the AttachedParent of the component. */
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="ArchVis")
TSoftObjectPtr<class AArchVisCineCameraActor> ArchVisCineCameraActor;
virtual const AActor* GetViewOwner() const override;
protected:
virtual void GetCameraView(float DeltaTime, FMinimalViewInfo& OutMinimalViewInfo) override;
/** The function used internally by GetCameraView to find the ArchVisCameraComponent to render. You can override it to fit your needs */
virtual class UArchVisCineCameraComponent* FindCameraComponent() const;
virtual void UpdateSceneCaptureContents(FSceneInterface* Scene, class ISceneRenderBuilder& SceneRenderBuilder) override;
};