如何在 ArKit iOS 中从 3D 点转换 2D 点 [英] How to convert 2D points from 3D Points in ArKit iOS

查看:30
本文介绍了如何在 ArKit iOS 中从 3D 点转换 2D 点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将 2d 点从 3d SCNNode 绘制到 uiview.

How do I get the 2d points to plot on to uiview from 3d SCNNode.

假设我有以下 SCNNodes

Suppose I have following SCNNodes

pos(1.002163 -0.524722 -0.770023)
pos(1.174463 -0.765098 -0.607172)
pos(0.668790 -0.744061 -0.696863)
pos(0.781208 -0.744061 -1.228943)

我需要上面的 2d 点.我是 Arkit 的新手.

And I need 2d points from above. I am new to Arkit.

推荐答案

您正在寻找 projectPoint

let projectedPoint = sceneView.projectPoint(pos)

这篇关于如何在 ArKit iOS 中从 3D 点转换 2D 点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆