ios - 在 Arkit SceneView 中增加线条的粗细
问题描述
我有这样的功能:
func getdrawnHorLineFrom(pos1: SCNVector3, toPos2: SCNVector3) -> SCNNode {
let obj1 = SCNVector3(x: toPos2.x, y: toPos2.y, z:pos1.z)
let line = lineFrom(vector: pos1, toVector: obj1)
let lineInBetween1 = SCNNode(geometry: line)
glLineWidth(15)
return lineInBetween1
}
还:
func lineFrom(vector vector1: SCNVector3, toVector vector2: SCNVector3) -> SCNGeometry {
let indices: [Int32] = [0, 1]
let source = SCNGeometrySource(vertices: [vector1, vector2])
let element = SCNGeometryElement(indices: indices, primitiveType: .line)
return SCNGeometry(sources: [source], elements: [element])
}
基本上,我试图在两个 SCNVector3 类型的 3D 点之间画一条线。绘制的线是具有原始类型“线”的“SCNGeometry”。
现在,我想增加我的线条粗细,使它看起来清晰。另外,我想知道,如果有什么办法,我可以让我的线显示为“虚线”。我为了增加线条的粗细尝试使用 'glLineWidth() 等,但没有成功。
如果有人可以帮助我,我会很高兴。
提前致谢!
解决方案
推荐阅读
- xcode - Xcode 错误 ITMS-90783:“缺少包显示名称”
- c++ - 如何在循环中使用 std::condition_variable
- apache-kafka - 无法启动 apache zookeeper
- swift - Swift 包管理器 Swift UI 视图初始化访问级别问题
- python-3.x - 尝试连接到 azure datalake 时,Kubernetes Pod 中出现“OAuth2Client:获取令牌请求失败”错误
- r - base-R 中的 lag() 和 lead()
- docker - How to create image by downloading manifest file and its blobs?
- c# - 绑定来自数据网格单元格的文本框用户输入
- r - 是否有 R 包来协助处理大数据?
- neo4j - 明确指定非歧义类型的关系和节点是否会改进密码查询?