- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在我的项目中使用 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/
我正在尝试使用新的 ARKit 来替换我拥有的另一个类似的解决方案。真是太棒了!但我似乎无法弄清楚如何以编程方式移动 ARAnchor。我想慢慢地将 anchor 移动到用户的左侧。 在用户前方 2
我正在试验 SpriteKit 和 ARKit,想知道如何计算同一场景中两个 ARAnchor 之间的角度。 这意味着获取 anchor 在世界上的位置并计算它们定义的线与水平面(或另一个任意平面)的
我有一个应用程序使用 ARImageAnchor 来通过相机检测图像。我注意到,虽然场景节点在 3D 空间中的位置会实时更新,但节点的方向(xyz 旋转)可能需要几秒钟才能更新。任何附加的场景节点在更
在将 SCNNode 添加到 ARSCNView 的场景后,我试图获取 anchor 。我的理解是应该自动创建 anchor ,但我似乎无法检索它。 下面是我添加它的方法。该节点保存在一个名为 tes
我在使用 ARSKView 的 ARkit 项目中遇到了障碍。 我想在屏幕上使用点击并创建 ARAnchor 时实现,多个 SKNodes 将从同一个 anchor 弹出。由于我需要单独与每个节点交互
你好,我是使用 ARKit 进行开发的新手,所以这可能是一个基本问题,但我可以将 ARAnchor 附加到移动的物体上,比如打印出来的条形码吗? 我正在尝试开发一个应用程序,其中不同的对象应该显示在不
我目前正在开发 ARKit 2.0 应用程序,用户需要在映射空间周围找到虚拟对象,我使用了 AR Persistence 并且我意识到在初始 ARWorldMap 重新定位后,所有对象都会立即出现,即
When application launched first a vertical surface is detected on one wall than camera focus to the
我正在使用 XCode 9 上的 AR 入门应用,其中 anchor 是在点击场景中创建的: override func touchesBegan(_ touches: Set, with event
我目前正在用 RealityKit 做一些实验。 我一直在查看一些示例代码,我对 ARAnchor 和 AnchorEntity 之间的区别以及何时使用其中一个感到有点困惑. 到目前为止我知道: 两者
在 ARKit 中,我们可以通过 .showFeaturePoints 类型属性可视化在 ARSession 中检测到的 Feature Points' Cloud: self.sceneView.d
这几天我一直在努力解决这个问题。 给定一个基于 ARKit 的应用程序,我可以在其中跟踪用户的面部,我如何才能从它的 anchor 获得面部的绝对旋转? 我可以获得 ARAnchor 的变换,它是一个
如何使 ARNode 指向 ARAnchor? 我想使用 art.scnassets/ship.scn 显示在屏幕中央并指向我刚刚放置在场景中某处的对象。 /// ViewController Cla
问题: 如何创建一个与 ARObjectAnchor.referenceObject 具有相同高度和宽度的新 SKSpriteNode。 上下文: 我目前正在摆弄 ARKit 的新对象检测功能,并且有
我正在使用 WWDC 2018 中推出的 ARKit 2.0 测试 Apple 的多用户 AR 演示应用程序:Creating a multiuser AR experience . 文档说,在每个设
我正在尝试将 ARAnchor 投影到 2D 空间,但我面临方向问题... 在我将左上角、右上角、左下角、右下角位置投影到二维空间的函数下面: /// Returns the projection o
我在我的项目中使用 ARAnchor,我想从这个 anchor 获取位置 (3D)。 代码: sceneView.session.currentFrame?.anchors.first?.transf
我正在使用ARSessionDelegate在 ARView我在其中初始化 ARBodyTrackingConfiguration . session方法 didAdd: [ARAnchor]和 di
我有下一个代码: guard let feauturePoint = frame.hitTest(normalizedPoint, types: .featurePoint).first?.w
我需要将多个不同的 ARWorldMap 实例组合在一起。换句话说,我需要使用 ARWorldMap 的两个(或更多)实例的组合 anchor 创建一个实例。 我可以在整个应用程序中共享同一个实例,但
我是一名优秀的程序员,十分优秀!