RoomAnchor: How to detect windows?

For RoomAnchors there's different mesh classifications for mesh anchors, but only walls and floors are supported by geometries() function.

So given this how can I get information about other mesh classifications?

Answered by Vision Pro Engineer in 796555022

Hey @rob42lou,

The geometries(of:) function only returns mesh geometries. In order to detect windows, you need a PlaneDetectionProvider that will provide you with the plane anchors. RoomAnchor has a planeAnchorIDs instance property that provides an array of IDs of the plane anchors associated with that room.

Let me know if you have additional questions,

Michael

Accepted Answer

Hey @rob42lou,

The geometries(of:) function only returns mesh geometries. In order to detect windows, you need a PlaneDetectionProvider that will provide you with the plane anchors. RoomAnchor has a planeAnchorIDs instance property that provides an array of IDs of the plane anchors associated with that room.

Let me know if you have additional questions,

Michael

This works great, thank you! However the Vision Pro doesn't seem to want to detect windows, or at least my windows. Works fine for walls/floors/doors/etc... Is there a certain window shape PlaneDetection is looking for ?

RoomAnchor: How to detect windows?
 
 
Q