我对了解scenekit几何有问题.
我有Blender的默认立方体,我导出为collada(DAE),并且可以将它带入scenekit ....一切都很好.
现在我想看到立方体的顶点.在DAE中,我可以看到"Cube-mesh-positions-array"的以下内容,
"1 1 -1 1 -1 -1 -1 -0.9999998 -1 -0.9999997 1 -1 1 0.9999995 1 0.9999994 -1.000001 1 -1 -0.9999997 1 -1 1 1"
现在我想在scenekit中做的是使用以下内容返回顶点:
SCNGeometrySource *vertexBuffer = [[cubeNode.geometry geometrySourcesForSemantic:SCNGeometrySourceSemanticVertex] objectAtIndex:0];
Run Code Online (Sandbox Code Playgroud)
如果我处理vertexBuffer(我已经尝试了很多查看数据的方法),它似乎不正确.
有人可以解释"SCNGeometrySourceSemanticVertex"给我的内容,以及如何正确提取顶点数据?我想看到的是:
X = "float"
Y = "float"
Z = "float"
Run Code Online (Sandbox Code Playgroud)
此外,我正在调查以下类/方法,这看起来很有前景(这里有一些好的数据值),但是来自gmpe的数据显示为空,是否有人能够解释"SCNGeometryElement"的数据属性包含什么?
SCNGeometryElement *gmpe = [theCurrentNode.geometry geometryElementAtIndex:0];
Run Code Online (Sandbox Code Playgroud)
谢谢,非常感谢,
d