gpt4 book ai didi

swift - ARAnchor 返回 SIMD 4x4 向量 - 这是什么意思?

转载 作者:行者123 更新时间:2023-11-28 13:27:23 24 4
gpt4 key购买 nike

我在我的项目中使用 ARAnchor,我想从这个 anchor 获取位置 (3D)。

代码:

sceneView.session.currentFrame?.anchors.first?.transform.transpose 

返回一个float4x4 SIMD vector

但是单独的值是什么意思呢?

我的载体:

[-0.030081563,  0.999284570,   0.022921648,   0.06462159], 
[ 0.574515400, -0.0014799305, 0.8184924, -0.47270963],
[ 0.0, 0.0, 0.0, 1.0 ]

最佳答案

Apple 文档说:

The SIMD provides support for matrices of up to 4 rows and 4 columns, containing 16 elements.

所有这 16 个元素旨在为您提供平移旋转< X、Y 和 Z 轴(以及投影).

您可以阅读 this post 有关 4x4 矩阵的更多详细信息。

下面是翻译元素在 4x4 矩阵中的样子:

    ┌               ┐
| 1 0 0 tx |
| 0 1 0 ty |
| 0 0 1 tz |
| 0 0 0 1 |
└ ┘

此外,您还可以阅读有关 transpose 的维基百科文章 矩阵。

关于swift - ARAnchor 返回 SIMD 4x4 向量 - 这是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58118837/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com