获取ARKit中检测到的平面的宽高

Obtaining width and height of the plane detected in ARKit

func getSizeOfModel(_ node: SCNNode){

   let (min, max) = node.boundingBox
  
   let widthOfNode = max.x - min.x
   let heightOfNode = max.y - min.y
   
   print("
        Width Of Node = \(widthOfNode)
        Height Of Node = \(heightOfNode)
    ")

将其添加到 viewcontroller.swift 的跟踪和可视化平面代码中是否符合我的目的?

你要的是ARPlaneAnchor.extent

https://developer.apple.com/documentation/arkit/arplaneanchor/2882055-extent