我想更好地理解 ARKit AR Camera 变换所在的相机坐标空间。在文档中 https://developer.apple.com/documentation/arkit/arcamera/2866108-transform, 它说
此变换为相机创建一个相对于设备方向恒定的局部坐标空间。在相机空间中,当设备位于UIDeviceOrientation.landscapeRight https://developer.apple.com/documentation/uikit/uideviceorientation/landscaperight方向 - 即,x 轴始终沿着设备的长轴指向,从前置摄像头指向“主页”按钮。 y 轴指向上方(相对于 UIDeviceOrientation.landscapeRight 方向),z 轴指向远离屏幕一侧的设备。
按照此,UIDeviceOrientation.landscapeRight 文档 https://developer.apple.com/documentation/uikit/uideviceorientation/landscaperight says:
设备处于横向模式,设备直立放置,
左侧的主页按钮。
当我试图理解这一点时,似乎之间存在冲突"the x-axis points to the right when the device is in UIDeviceOrientation.landscapeRight orientation"
and "that is, the x-axis always points along the long axis of the device, from the front-facing camera toward the Home button"
。前者的+x 位于右侧,后者的+x 位于左侧。
这是我的想象"the x-axis points to the right when the device is in UIDeviceOrientation.landscapeRight orientation"
:
这就是我的想象"that is, the x-axis always points along the long axis of the device, from the front-facing camera toward the Home button"
:
感谢任何帮助,谢谢!
更新:它不会影响这个问题,但为了更清楚地说明,我问这个问题的原因是因为我有兴趣从以下位置获取 x、y 和 z 地磁数据值核心位置 https://developer.apple.com/documentation/corelocation/clheading。在“核心位置”中,如果手机处于纵向模式,则 +x 朝右,+y 朝上,+z 朝用户。因此,ARKit 的相机坐标系似乎与 Core Location 中的相机坐标系不同。