how to re-render the scanned mesh content with realityKit's ARView?

只谈情不闲聊 提交于 2021-01-28 07:51:38

问题


I can modify the line color of the mesh using the following code.

extension ARMeshClassification {
    var description: String {
        switch self {
        case .ceiling: return "Ceiling"
        case .door: return "Door"
        case .floor: return "Floor"
        case .seat: return "Seat"
        case .table: return "Table"
        case .wall: return "Wall"
        case .window: return "Window"
        case .none: return "None"
        @unknown default: return "Unknown"
        }
    }
    
    var color: UIColor {
        switch self {
        case .ceiling: return .red
        case .door: return .green
        case .floor: return .blue
        case .seat: return .cyan
        case .table: return .magenta
        case .wall: return .yellow
        case .window: return .black
        case .none: return .systemOrange
        @unknown default: return .gray
        }
    }
}

But I can't find a way to modify the content of the mesh,let the monitored grid plane display other colors. same effect as 3d scanner app.

eg: https://i.stack.imgur.com/NhNdx.png

来源:https://stackoverflow.com/questions/64796845/how-to-re-render-the-scanned-mesh-content-with-realitykits-arview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!