ios - SceneKit 自定义几何图形 : I know multi position(SCNVector). 如何创建自定义几何图形

标签 ios geometry scenekit

SceneKit custom geometry:  

我知道多位置(SCNVector)。

如何创建自定义几何图形

the bottom side position:(0,0,0) (50,0,0) (50,0,-50) (150,0,-50) (150,0,125) (0,0,125) (25,0,75) (25,0,50) (0,0,50)

enter image description here

the top side position:(0,2,0) (50,2,0) (50,2,-50) (150,2,-50) (150,2,125) (0,2,125) (25,2,75) (25,2,50) (0,2,50),   y—axis move 2

最佳答案

鉴于您有一个高度恒定的平面形状,最简单的方法是为该形状创建一个 2D UIBezierPath 并使用该路径创建一个拉伸(stretch)的 SCNShape挤压深度是几何体的厚度。

关于ios - SceneKit 自定义几何图形 : I know multi position(SCNVector). 如何创建自定义几何图形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34148175/

相关文章:

ios - 如何使用递归遍历大纲中的所有 child ?

iphone - iOS 触摸换图

c++ - Boost.Geometry 找不到多边形线交点的第二个点

python - 哪条矩形线先命中

swift - 是否可以像 SKScene 一样在 SCNScene 或 SCNNode 中使用 "update(_ currentTime: TimeInterval)"?

ios - [UIColor getWhite :alpha:] 问题

ios - 当 UICollectionView 嵌套在 UITableVIew 中时无法选择

math - 判断两条线是否相交

ios - SceneKit 如何绘制一个显示网格状表面而不是光滑的球体?

ios - 如何在 SceneKit : consecutive statements on a line must be separated by ;? 中写入新的着色器文件