public NativeSession(IntPtr sessionHandle, IntPtr frameHandle) { SessionHandle = sessionHandle; FrameHandle = frameHandle; m_TrackableManager = new TrackableManager(this); AnchorApi = new AnchorApi(this); AugmentedImageApi = new AugmentedImageApi(this); AugmentedImageDatabaseApi = new AugmentedImageDatabaseApi(this); CameraApi = new CameraApi(this); CameraMetadataApi = new CameraMetadataApi(this); FrameApi = new FrameApi(this); HitTestApi = new HitTestApi(this); ImageApi = new ImageApi(this); LightEstimateApi = new LightEstimateApi(this); PlaneApi = new PlaneApi(this); PointApi = new PointApi(this); PointCloudApi = new PointCloudApi(this); PoseApi = new PoseApi(this); SessionApi = new SessionApi(this); SessionConfigApi = new SessionConfigApi(this); TrackableApi = new TrackableApi(this); TrackableListApi = new TrackableListApi(this); #if !UNITY_EDITOR if (!s_ReportedEngineType) { SessionApi.ReportEngineType(); s_ReportedEngineType = true; } #endif }
public void OnUpdate() { // After first frame, release previous frame's point cloud. if (m_PointCloudHandle != IntPtr.Zero) { m_LastReleasedPointcloudTimestamp = PointCloudApi.GetTimestamp(m_PointCloudHandle); PointCloudApi.Release(m_PointCloudHandle); m_PointCloudHandle = IntPtr.Zero; } // TODO (b/73256094): Remove when fixed. if (LifecycleManager.Instance.SessionStatus == SessionStatus.Tracking) { FrameApi.TryAcquirePointCloudHandle(out m_PointCloudHandle); } }
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 NativeSession(IntPtr sessionHandle, IntPtr frameHandle) { m_SessionHandle = sessionHandle; m_FrameHandle = frameHandle; m_TrackableManager = new TrackableManager(this); AnchorApi = new AnchorApi(this); CameraApi = new CameraApi(this); CameraMetadataApi = new CameraMetadataApi(this); FrameApi = new FrameApi(this); HitTestApi = new HitTestApi(this); LightEstimateApi = new LightEstimateApi(this); PlaneApi = new PlaneApi(this); PointApi = new PointApi(this); PointCloudApi = new PointCloudApi(this); PoseApi = new PoseApi(this); SessionApi = new SessionApi(this); SessionConfigApi = new SessionConfigApi(this); TrackableApi = new TrackableApi(this); TrackableListApi = new TrackableListApi(this); }
public NativeSession(IntPtr sessionHandle, IntPtr frameHandle) { IsDestroyed = false; SessionHandle = sessionHandle; FrameHandle = frameHandle; _pointCloudManager = new PointCloudManager(this); _trackableManager = new TrackableManager(this); AnchorApi = new AnchorApi(this); AugmentedFaceApi = new AugmentedFaceApi(this); AugmentedImageApi = new AugmentedImageApi(this); AugmentedImageDatabaseApi = new AugmentedImageDatabaseApi(this); CameraApi = new CameraApi(this); CameraConfigApi = new CameraConfigApi(this); CameraConfigFilterApi = new CameraConfigFilterApi(this); CameraConfigListApi = new CameraConfigListApi(this); CameraMetadataApi = new CameraMetadataApi(this); FrameApi = new FrameApi(this); HitTestApi = new HitTestApi(this); ImageApi = new ImageApi(this); LightEstimateApi = new LightEstimateApi(this); PlaneApi = new PlaneApi(this); PointApi = new PointApi(this); PointCloudApi = new PointCloudApi(this); PoseApi = new PoseApi(this); RecordingConfigApi = new RecordingConfigApi(this); TrackApi = new TrackApi(this); TrackDataApi = new TrackDataApi(this); TrackDataListApi = new TrackDataListApi(this); SessionApi = new SessionApi(this); SessionConfigApi = new SessionConfigApi(this); TrackableApi = new TrackableApi(this); TrackableListApi = new TrackableListApi(this); #if !UNITY_EDITOR // Engine type is per session. Hence setting it for each // native session. SessionApi.ReportEngineType(); #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; } // TODO (b/73256094): Remove when fixed. if (LifecycleManager.Instance.IsTracking) { IntPtr pointCloudHandle; FrameApi.TryAcquirePointCloudHandle(out pointCloudHandle); PointCloudHandle = pointCloudHandle; } } }