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:方法。
Managing Device Camera Behavior
autoFocusEnabled
A Boolean value that determines whether the device camera uses fixed focus or autofocus behavior.
一个布尔值,用于确定设备相机是使用固定焦点还是自动聚焦行为。
Inherits From ARConfiguration
网友评论