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 virtual void AddProcessingToFrameBuffer(TArray<FColor>& buffer) override;
38
43 UFUNCTION(BlueprintPure)
44 FDepthCameraParameters GetDepthCameraParameters()
45 {
46 return DepthCameraParameters;
47 }
48
53 virtual ESensorTypes GetSensorType() const override
54 {
56 }
57
61 virtual FString GetParametersAsString() const override
62 {
63 return StructToString(DepthCameraParameters);
64 }
65
66private:
67
68 friend class USensorFactory;
69
75 void DepthInit(FDepthCameraParameters Parameters, bool SimulateSensor = true);
76
82 void Init(FCameraBaseParameters parameters, bool SimulateSensor = true) override;
83
88 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
89
93 void SetupDepthMaterial(const bool UseGrayscale);
94
96
97 TWeakObjectPtr<UMaterial> DepthEffectMaterialGrayscale;
98
99 TWeakObjectPtr<UMaterial> DepthEffectMaterial;
100
101};
ESensorTypes
Definition: SensorTypes.h:15
Definition: Camera.h:53
TWeakObjectPtr< UMaterial > DepthEffectMaterialGrayscale
Definition: DepthCamera.h:97
TWeakObjectPtr< UMaterial > DepthEffectMaterial
Definition: DepthCamera.h:99
virtual FString GetParametersAsString() const override
Definition: DepthCamera.h:61
FDepthCameraParameters DepthCameraParameters
Definition: DepthCamera.h:95
virtual ESensorTypes GetSensorType() const override
Definition: DepthCamera.h:53