AROrientationTrackingConfiguration

A configuration that uses the back-facing camera and tracks only a device's orientation.

使用后置攝像頭并僅跟蹤設備方向的配置。


Overview

All AR configurations establish a correspondence between the real world the device inhabits and a virtual 3D coordinate space where you can model content. When your app displays that content together with a live camera image, the user experiences the illusion that your virtual content is part of the real world.?

Creating and maintaining this correspondence between spaces requires tracking the device's motion. The?AROrientationTrackingConfiguration?class tracks the device's movement with three degrees of freedom (3DOF): specifically, the three rotation axes (roll, pitch, and yaw).?

This basic level of motion tracking can create limited AR experiences: A virtual object can appear to be part of the real world, even as the user rotates the device to look above, below, or beside that object. However, this configuration cannot track movement of the device: non-trivially changing the device's position breaks the AR illusion, causing virtual content to appear to drift relative to the real world. For example, the user cannot walk around to see the sides and back of a virtual object. Additionally, 3DOF tracking does not support plane detection or hit testing.

概述

所有AR配置都可以在設備所處在的真實世界與虛擬3D坐標空間之間建立對應關系,您可以在其中對內容進行建模。當您的應用程序將該內容與實時相機圖像一起顯示時,用戶會體驗到虛擬內容是真實世界的一部分的錯覺。

在空間之間創建和維護這種對應關系需要跟蹤設備的運動。 AROrientationTrackingConfiguration類以三個自由度(3DOF)跟蹤設備的運動:特別是三個旋轉軸(滾動,俯仰和偏航)。這種基本的運動跟蹤級別可以創建有限的AR體驗:即使用戶將設備旋轉到位于該對象的上方,下方或旁邊,虛擬對象也可能成為真實世界的一部分。但是,此配置以下場景無法跟蹤設備的移動:頻繁地更改設備的位置會打破AR體驗,導致虛擬內容看起來相對于現實世界發生漂移。例如,用戶不能四處走動以查看虛擬對象的側面和背面。此外,3DOF跟蹤不支持平面檢測或命中測試。

Important

Because 3DOF tracking creates limited AR experiences, you should generally not use the?AROrientationTrackingConfiguration?class directly. Instead, use the subclass?ARWorldTrackingConfiguration?for tracking with six degrees of freedom (6DOF), plane detection, and hit testing. Use 3DOF tracking only as a fallback in situations where 6DOF tracking is temporarily unavailable.

重要

由于3DOF跟蹤會創建有限的AR體驗,因此您通常不應直接使用AROrientationTrackingConfiguration類。 相反,使用子類ARWorldTrackingConfiguration進行六自由度(6DOF)跟蹤,平面檢測和命中測試。 僅在3D自動追蹤暫時不可用的情況下,才使用3DOF追蹤作為后備。



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Creating a Configuration?


-?init
Creates a new orientation tracking configuration.
創建一個新的方向跟蹤配置。

Discussion

To use the configuration in an AR session, pass it to the?ARSession?runWithConfiguration:options:?method

討論

要在AR會話中使用該配置,請將其傳遞給ARSession runWithConfiguration:options:方法。

+?new


? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Managing Device Camera Behavior


autoFocusEnabled
A Boolean value that determines whether the device camera uses fixed focus or autofocus behavior.
一個布爾值,用于確定設備相機是使用固定焦點還是自動聚焦行為。


Inherits From ? ?ARConfiguration

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容