Browse Source

Add LoggingZEDManager

Danghor 2 năm trước cách đây
mục cha
commit
ef8f88fa95
1 tập tin đã thay đổi với 42 bổ sung0 xóa
  1. 42 0
      Assets/ZED/SDK/Helpers/Scripts/LoggingZEDManager.cs

+ 42 - 0
Assets/ZED/SDK/Helpers/Scripts/LoggingZEDManager.cs

@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using sl;
+
+namespace Assets.ZED.SDK.Helpers.Scripts
+{
+    internal class LoggingZEDManager : IZEDManager
+    {
+        ZEDManager zedManager;
+
+        public LoggingZEDManager(ZEDManager zedManager)
+        {
+            this.zedManager = zedManager;
+        }
+
+        public bool IsObjectDetectionRunning => zedManager.IsObjectDetectionRunning;
+
+        public bool EstimateInitialPosition => zedManager.EstimateInitialPosition;
+
+        public DETECTION_MODEL ObjectDetectionModel => zedManager.ObjectDetectionModel;
+
+        public event ZEDManager.onNewDetectionTriggerDelegate OnObjectDetection
+        {
+            add => zedManager.OnObjectDetection += value;
+            remove => zedManager.OnObjectDetection -= value;
+        }
+
+        public event ZEDManager.OnZEDManagerReady OnZEDReady
+        {
+            add => zedManager.OnZEDReady += value;
+            remove => zedManager.OnZEDReady -= value;
+        }
+
+        public void StartObjectDetection()
+        {
+            zedManager.StartObjectDetection();
+        }
+    }
+}