6 #include "RealSenseInspector.generated.h" 11 UCLASS(ClassGroup="RealSense", BlueprintType)
14 GENERATED_UCLASS_BODY()
16 friend class FRealSenseInspectorCustomization;
22 UPROPERTY(Category="RealSense", BlueprintReadOnly)
25 UPROPERTY(Category="RealSense", BlueprintReadOnly)
28 UFUNCTION(Category="RealSense", BlueprintCallable)
31 UFUNCTION(Category="RealSense", BlueprintCallable)
36 UPROPERTY(Category="Device", BlueprintReadWrite, EditAnywhere)
39 UPROPERTY(Category = "Device", BlueprintReadWrite, EditAnywhere)
42 UPROPERTY(Category = "Device", BlueprintReadWrite, EditAnywhere)
45 UPROPERTY(Category="Device", BlueprintReadWrite, EditAnywhere)
46 bool bEnablePolling = false;
48 UPROPERTY(Category="Device", BlueprintReadWrite, EditAnywhere, meta=(ClampMin="0.001", ClampMax="1", UIMin="0.001", UIMax="1"))
49 float PollFrameRate = 1.0
f / 60.0
f;
51 UPROPERTY(Category="Device", BlueprintReadWrite, EditAnywhere, meta=(ClampMin="0.001", ClampMax="10", UIMin="0.001", UIMax="10"))
52 float WaitFrameTimeout = 1.0f;
56 UPROPERTY(Category="DepthStream", BlueprintReadWrite, EditAnywhere)
59 UPROPERTY(Category="DepthStream", BlueprintReadWrite, EditAnywhere)
60 bool bEnableRawDepth = true;
62 UPROPERTY(Category="DepthStream", BlueprintReadWrite, EditAnywhere)
63 bool bEnableColorizedDepth = true;
65 UPROPERTY(Category = "DepthStream", BlueprintReadWrite, EditAnywhere)
66 bool bAlignDepthToColor = true;
68 UPROPERTY(Category="DepthStream", BlueprintReadWrite, EditAnywhere)
69 bool bEqualizeHistogram = true;
71 UPROPERTY(Category="DepthStream", BlueprintReadWrite, EditAnywhere, meta=(ClampMin="0", ClampMax="10", UIMin="0", UIMax="10"))
74 UPROPERTY(Category="DepthStream", BlueprintReadWrite, EditAnywhere, meta=(ClampMin="0.1", ClampMax="10", UIMin="0.1", UIMax="10"))
77 UPROPERTY(Category="DepthStream", BlueprintReadWrite, EditAnywhere)
80 UPROPERTY(Category="DepthStream", BlueprintReadOnly)
81 float DepthScale = 0.001f;
83 UPROPERTY(Category="DepthStream", BlueprintReadOnly)
84 UTexture2D* DepthRawTexture;
86 UPROPERTY(Category="DepthStream", BlueprintReadOnly)
87 UTexture2D* DepthColorizedTexture;
91 UPROPERTY(Category="ColorStream", BlueprintReadWrite, EditAnywhere)
94 UPROPERTY(Category="ColorStream", BlueprintReadWrite, EditAnywhere)
95 bool bEnableColor = true;
97 UPROPERTY(Category="ColorStream", BlueprintReadOnly)
98 UTexture2D* ColorTexture;
102 UPROPERTY(Category="InfraredStream", BlueprintReadWrite, EditAnywhere)
105 UPROPERTY(Category="InfraredStream", BlueprintReadWrite, EditAnywhere)
106 bool bEnableInfrared = true;
108 UPROPERTY(Category="InfraredStream", BlueprintReadOnly)
109 UTexture2D* InfraredTexture;
113 UFUNCTION(Category="
PointCloud", BlueprintCallable)
114 void SetPointCloudMaterial(
int SectionId, UMaterialInterface* Material);
116 UPROPERTY(Category="PointCloud", BlueprintReadWrite, EditAnywhere)
117 bool bEnablePcl = false;
119 UPROPERTY(Category="PointCloud", BlueprintReadWrite, EditAnywhere, meta=(ClampMin="0.0", UIMin="0.0"))
120 float PclScale = 1.0f;
122 UPROPERTY(Category="PointCloud", BlueprintReadWrite, EditAnywhere, meta=(ClampMin="0.0001", ClampMax="10", UIMin="0.0001", UIMax="10"))
123 float PclVoxelSize = 1.0f;
125 UPROPERTY(Category="PointCloud", BlueprintReadWrite, EditAnywhere, meta=(ClampMin="0.0", ClampMax="1.0", UIMin="0.0", UIMax="1.0"))
126 float PclDensity = 0.2f;
128 UPROPERTY(Category="PointCloud", BlueprintReadWrite, EditAnywhere, meta=(ClampMin="0.016", ClampMax="100.0", UIMin="0.016", UIMax="100.0"))
129 float PclRenderRate = 5;
131 UPROPERTY(Category="PointCloud", BlueprintReadOnly)
132 class URuntimeMeshComponent* PclMesh;
134 UPROPERTY(Category = "PointCloud", BlueprintReadOnly)
135 class UMaterialInterface* PclMaterial;
140 virtual
void Tick(
float DeltaSeconds) override;
144 void GetDeviceDefaultProfileConfig();
148 void ProcessFrameset(class
rs2::frameset* Frameset);
149 void UpdatePointCloud();
152 FCriticalSection StateMx;
153 FCriticalSection PointCloudMx;
173 int PclFramesetId = 0;
174 float PclRenderAccum = 0;
175 volatile int PclCalculateFlag =
false;
176 volatile int PclReadyFlag =
false;
178 TUniquePtr<class FRealSenseInspectorWorker>
Worker;
179 TUniquePtr<class FRunnableThread>
Thread;
180 volatile int StartedFlag =
false;
181 volatile int FramesetId = 0;
189 virtual bool Init() {
return true; }
TArray< int32 > PclIndices
::sensor_msgs::PointCloud_< std::allocator< void > > PointCloud
ARealSenseInspector * Context
TMap< int32, TUniquePtr< FMeshSection > > PclMeshData
TUniquePtr< class rs2::pointcloud > RsPointCloud
TUniquePtr< class FRunnableThread > Thread
TUniquePtr< class FRealSenseInspectorWorker > Worker
FRealSenseInspectorWorker(ARealSenseInspector *Context)
TArray< FPointCloudVertex > PclVertices
virtual ~FRealSenseInspectorWorker()
#define DECLARE_RUNTIME_MESH_VERTEX(VertexName, NeedsPosition, NeedsNormal, NeedsTangent, NeedsColor, UVChannelCount, TangentsType, UVChannelType)
TUniquePtr< class rs2::points > RsPoints