8#include "Components/SceneCaptureComponent2D.h"
9#include "Materials/Material.h"
13 PrimaryActorTick.bCanEverTick =
false;
31 Super::Init(parameters, SimulateSensor);
38 Super::EndPlay(EndPlayReason);
60 if (SceneCaptureComponent)
62 FPostProcessSettings& PostProcessSettings = SceneCaptureComponent->PostProcessSettings;
65 FString Path =
"/Game/Agrarsense/Materials/PostProcessingMaterials/M_ThermalCameraMaterial.M_ThermalCameraMaterial";
66 UMaterial* BaseMaterial = Cast<UMaterial>(StaticLoadObject(UMaterial::StaticClass(),
nullptr, *Path));
69 UMaterialInstanceDynamic* DynamicMaterialInstance = UMaterialInstanceDynamic::Create(BaseMaterial,
this);
96 Material->SetScalarParameterValue(
WidthNoise, Width);
97 Material->SetScalarParameterValue(
HeightNoise, Height);
void ChangeCameraParameters(FCameraBaseParameters newParameters)
void SetShadowRendering(bool RenderShadows)
USceneCaptureComponent2D * GetCaptureComponent2D() const
void Init(FCameraBaseParameters parameters, bool SimulateSensor=true) override
void UpdateThermalMaterial()
static const FName ColdColor2
static const FName WidthNoise
static const FName WarmColor
static const FName ColdColor
void ChangeThermalCameraParameters(FThermalCameraParameters Parameters)
TWeakObjectPtr< UMaterialInstanceDynamic > ThermalMaterial
AThermalCamera(const FObjectInitializer &ObjectInitializer)
void ThermalInit(FThermalCameraParameters Parameters, bool SimulateSensor=true)
FThermalCameraParameters ThermalCameraParameters
static const FName WarmColor2
virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override
static const FName HeightNoise
int32 WidthResolutionNoise
int32 HeightResolutionNoise
FCameraBaseParameters CameraParameters
bool AllowCustomNoiseResolution