Agrarsense
ThermalCamera.h
Go to the documentation of this file.
1// Copyright (c) 2023 FrostBit Software Lab at the Lapland University of Applied Sciences
2//
3// This work is licensed under the terms of the MIT license.
4// For a copy, see <https://opensource.org/licenses/MIT>.
5
6#pragma once
7
10
11#include "Materials/MaterialInstanceDynamic.h"
12
13#include "ThermalCamera.generated.h"
14
20UCLASS()
21class AGRARSENSE_API AThermalCamera : public ACamera
22{
23 GENERATED_BODY()
24
25public:
26
27 AThermalCamera(const FObjectInitializer& ObjectInitializer);
28
29 UFUNCTION(BlueprintCallable)
30 void ChangeThermalCameraParameters(FThermalCameraParameters Parameters);
31
32 UFUNCTION(BlueprintCallable, BlueprintPure)
33 FThermalCameraParameters GetThermalCameraParameters() const
34 {
35 return ThermalCameraParameters;
36 }
37
42 virtual ESensorTypes GetSensorType() const override
43 {
45 }
46
50 virtual FString GetParametersAsString() const override
51 {
52 return StructToString(ThermalCameraParameters);
53 }
54
55private:
56
57 friend class USensorFactory;
58
63 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
64
65 void ThermalInit(FThermalCameraParameters Parameters, bool SimulateSensor = true);
66
67 void Init(FCameraBaseParameters parameters, bool SimulateSensor = true) override;
68
69 void SetupMaterial();
70
71 void UpdateThermalMaterial();
72
74
75 TWeakObjectPtr<UMaterialInstanceDynamic> ThermalMaterial;
76
77 inline static const FName WidthNoise = "WidthNoise";
78 inline static const FName HeightNoise = "HeightNoise";
79
80 inline static const FName WarmColor = "WarmColor";
81 inline static const FName WarmColor2 = "WarmColor2";
82 inline static const FName ColdColor = "ColdColor";
83 inline static const FName ColdColor2 = "ColdColor2";
84
85};
ESensorTypes
Definition: SensorTypes.h:15
Definition: Camera.h:52
TWeakObjectPtr< UMaterialInstanceDynamic > ThermalMaterial
Definition: ThermalCamera.h:75
FThermalCameraParameters ThermalCameraParameters
Definition: ThermalCamera.h:73
virtual ESensorTypes GetSensorType() const override
Definition: ThermalCamera.h:42
virtual FString GetParametersAsString() const override
Definition: ThermalCamera.h:50