В настоящее время мой код выглядит так:
Код: Выделить всё
func addSurfacesToScene(scene: SCNScene, surfaces: [CapturedRoom.Surface], surfaceType: SurfaceType) {
for surface in surfaces {
let node = createSurfaceNode(from: surface, type: surfaceType)
scene.rootNode.addChildNode(node)
}
}
// Creates the surface node
geometry = SCNBox(width: CGFloat(surface.dimensions.x), height: CGFloat(surface.dimensions.y), length: CGFloat(surface.dimensions.z), chamferRadius: 0)
The addSurfacesToScene function adds surfaces to the scene, but currently, the SCNBox geometry creates solid walls without any cutouts.
Спасибо за помощь!
Подробнее здесь: https://stackoverflow.com/questions/786 ... n-scenekit