Agrarsense
DepthCamera.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
8#include "Camera.h"
10
11#include "DepthCamera.generated.h"
12
17UCLASS()
18class AGRARSENSE_API ADepthCamera : public ACamera
19{
20 GENERATED_BODY()
21
22public:
23
24 ADepthCamera(const FObjectInitializer& ObjectInitializer);
25
30 UFUNCTION(BlueprintCallable)
31 void ChangeDepthCameraParameters(FDepthCameraParameters Parameters);
32
37 UFUNCTION(BlueprintPure)
38 FDepthCameraParameters GetDepthCameraParameters()
39 {
40 return DepthCameraParameters;
41 }
42
47 virtual ESensorTypes GetSensorType() const override
48 {
50 }
51
55 virtual FString GetParametersAsString() const override
56 {
57 return StructToString(DepthCameraParameters);
58 }
59
60private:
61
62 friend class USensorFactory;
63
69 void DepthInit(FDepthCameraParameters Parameters, bool SimulateSensor = true);
70
76 void Init(FCameraBaseParameters parameters, bool SimulateSensor = true) override;
77
82 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
83
87 void SetupDepthMaterial(const bool UseGrayscale);
88
90
91 TWeakObjectPtr<UMaterial> DepthEffectMaterialGrayscale;
92
93 TWeakObjectPtr<UMaterial> DepthEffectMaterial;
94
95};
ESensorTypes
Definition: SensorTypes.h:15
Definition: Camera.h:52
TWeakObjectPtr< UMaterial > DepthEffectMaterialGrayscale
Definition: DepthCamera.h:91
TWeakObjectPtr< UMaterial > DepthEffectMaterial
Definition: DepthCamera.h:93
virtual FString GetParametersAsString() const override
Definition: DepthCamera.h:55
FDepthCameraParameters DepthCameraParameters
Definition: DepthCamera.h:89
virtual ESensorTypes GetSensorType() const override
Definition: DepthCamera.h:47