示例#1
0
        public void OnUpdate(IntPtr frameHandle)
        {
            FrameHandle = frameHandle;

#if UNITY_EDITOR || UNITY_ANDROID
            // After first frame, release previous frame's point cloud.
            if (PointCloudHandle != IntPtr.Zero)
            {
                m_LastReleasedPointcloudTimestamp = PointCloudApi.GetTimestamp(PointCloudHandle);
                PointCloudApi.Release(PointCloudHandle);
                PointCloudHandle = IntPtr.Zero;
            }

            IntPtr pointCloudHandle;
            FrameApi.TryAcquirePointCloudHandle(out pointCloudHandle);
            PointCloudHandle = pointCloudHandle;
#endif
        }
        public void OnUpdate(IntPtr frameHandle)
        {
            FrameHandle = frameHandle;

            if (ApiConstants.isBehaveAsIfOnAndroid)
            {
                // After first frame, release previous frame's point cloud.
                if (PointCloudHandle != IntPtr.Zero)
                {
                    m_LastReleasedPointcloudTimestamp = PointCloudApi.GetTimestamp(PointCloudHandle);
                    PointCloudApi.Release(PointCloudHandle);
                    PointCloudHandle = IntPtr.Zero;
                }

                IntPtr pointCloudHandle;
                FrameApi.TryAcquirePointCloudHandle(out pointCloudHandle);
                PointCloudHandle = pointCloudHandle;
            }
        }
        public void OnUpdate(IntPtr frameHandle)
        {
            FrameHandle = frameHandle;

            if (ApiConstants.isBehaveAsIfOnAndroid)
            {
                // After first frame, release previous frame's point cloud.
                if (PointCloudHandle != IntPtr.Zero)
                {
                    m_LastReleasedPointcloudTimestamp = PointCloudApi.GetTimestamp(PointCloudHandle);
                    PointCloudApi.Release(PointCloudHandle);
                    PointCloudHandle = IntPtr.Zero;
                }

                // TODO (b/73256094): Remove when fixed.
                if (LifecycleManager.Instance.IsTracking)
                {
                    IntPtr pointCloudHandle;
                    FrameApi.TryAcquirePointCloudHandle(out pointCloudHandle);
                    PointCloudHandle = pointCloudHandle;
                }
            }
        }