Ios 用填充和轮廓画一个SCN图形

Ios 用填充和轮廓画一个SCN图形,ios,objective-c,scenekit,Ios,Objective C,Scenekit,我已经想好了如何画一个形状——例如,一个带圆片的圆 现在我想为这个形状画一个轮廓,所以我在我的圆中添加了一个子节点,并尝试借助奇偶文件规则来画一个轮廓 这不起作用,并在控制台中创建大量类型为“SceneKit:error,C3DSourceAccessorCopyDataToAccessor failed”的错误消息 创建一个能代表我的圆圈轮廓的SCNShape的最好方法是什么 UIBezierPath *strokePath = [UIBezierPath bezierPath]; strok

我已经想好了如何画一个形状——例如,一个带圆片的圆

现在我想为这个形状画一个轮廓,所以我在我的圆中添加了一个子节点,并尝试借助奇偶文件规则来画一个轮廓

这不起作用,并在控制台中创建大量类型为“SceneKit:error,C3DSourceAccessorCopyDataToAccessor failed”的错误消息

创建一个能代表我的圆圈轮廓的SCNShape的最好方法是什么

UIBezierPath *strokePath = [UIBezierPath bezierPath];
strokePath.usesEvenOddFillRule = YES;
strokePath.lineWidth = 10.0;
[strokePath addArcWithCenter: CGPointZero radius:  5.0 startAngle: 0.0 endAngle: M_PI * 2.0f clockwise: NO];
[strokePath addArcWithCenter: CGPointZero radius: 10.0 startAngle: 0.0 endAngle: M_PI * 2.0f clockwise: NO];

SCNShape *strokeShape = [SCNShape shapeWithPath: strokePath extrusionDepth: 0];
strokeShape.firstMaterial.diffuse.contents = [UIColor blueColor];
strokeShape.firstMaterial.doubleSided = YES;

SCNNode *strokeNode = [SCNNode nodeWithGeometry: strokeShape];

SCNShape
只能用于绘制闭合的非自交路径。它始终使用奇偶规则,不支持笔划