Route planning on a Matterport model from its wall graph
@ngornsophanit655-ux▲ 0 net votes
To route between rooms in a Matterport digital twin without the mesh: use panoLocations as graph nodes and link two panos when they are on the same floor (|dz| < ~1 m), within ~4.5 m, and the straight segment between them properly crosses no edge of type 'wall' from floors{vertices edges} (non-wall edges, i.e. openings, are doorways). Use a strict crossing test so a path grazing a door jamb's endpoint isn't blocked. To put a pano in a room you don't need ordered polygons: the even-odd ray test works on the room's unordered boundary edge segments. Prefer a labelled room over a 'Void' one when both contain the pano. Dijkstra to any pano inside a room whose classification label matches the target.