public TrackableApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public CameraApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public SessionConfigApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public TrackableManager(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public AugmentedFaceApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public SessionApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public PointApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
private void _OnEarlyUpdate() { // Update session activity before EarlyUpdate. if (m_HaveDisableToEnableTransition) { _SetSessionEnabled(false); _SetSessionEnabled(true); m_HaveDisableToEnableTransition = false; // Avoid firing session enable event twice. if (m_DesiredSessionState.HasValue && m_DesiredSessionState.Value) { m_DesiredSessionState = null; } } if (m_DesiredSessionState.HasValue) { _SetSessionEnabled(m_DesiredSessionState.Value); m_DesiredSessionState = null; } // Perform updates before calling ArPresto_update. if (SessionComponent != null) { IntPtr previousSession = IntPtr.Zero; ExternApi.ArPresto_getSession(ref previousSession); if (UpdateSessionFeatures != null) { UpdateSessionFeatures(); } _SetCameraDirection(SessionComponent.DeviceCameraDirection); IntPtr currentSession = IntPtr.Zero; ExternApi.ArPresto_getSession(ref currentSession); // Fire the session enabled event when the underlying session has been changed // due to session feature update(camera direction etc). if (previousSession != currentSession) { _FireOnSessionSetEnabled(false); _FireOnSessionSetEnabled(true); } _SetConfiguration(SessionComponent.SessionConfig); } _UpdateDisplayGeometry(); // Update ArPresto and potentially ArCore. ExternApi.ArPresto_update(); SessionStatus previousSessionStatus = SessionStatus; // Get state information from ARPresto. ApiPrestoStatus prestoStatus = ApiPrestoStatus.Uninitialized; ExternApi.ArPresto_getStatus(ref prestoStatus); SessionStatus = prestoStatus.ToSessionStatus(); LostTrackingReason = LostTrackingReason.None; if (NativeSession != null && SessionStatus == SessionStatus.LostTracking) { var cameraHandle = NativeSession.FrameApi.AcquireCamera(); LostTrackingReason = NativeSession.CameraApi.GetLostTrackingReason(cameraHandle); NativeSession.CameraApi.Release(cameraHandle); } // If the current status is an error, check if the SessionStatus error state changed. if (SessionStatus.IsError() && previousSessionStatus.IsError() != SessionStatus.IsError()) { // Disable internal session bits so we properly pause the session due to error. _FireOnSessionSetEnabled(false); m_DisabledSessionOnErrorState = true; } else if (SessionStatus.IsValid() && m_DisabledSessionOnErrorState) { if (SessionComponent.enabled) { _FireOnSessionSetEnabled(true); } m_DisabledSessionOnErrorState = false; } // Get the current session from presto and note if it has changed. IntPtr sessionHandle = IntPtr.Zero; ExternApi.ArPresto_getSession(ref sessionHandle); IsSessionChangedThisFrame = m_CachedSessionHandle != sessionHandle; m_CachedSessionHandle = sessionHandle; ExternApi.ArPresto_getFrame(ref m_CachedFrameHandle); // Update the native session with the newest frame. if (NativeSession != null) { NativeSession.OnUpdate(m_CachedFrameHandle); } _UpdateTextureIfNeeded(); if (EarlyUpdate != null) { EarlyUpdate(); } }
public PoseApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public AugmentedImageDatabaseApi(NativeSession nativeSession) { }
public CameraConfigFilterApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public FrameApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public CameraConfigListApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public LightEstimateApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }
public AnchorApi(NativeSession nativeSession) { m_NativeSession = nativeSession; }