Building-scale connectivity graph: rooms as nodes, doors / openings as edges. The output of every SpaceExtractor and the input to every ViewpointSampler / TourPlanner.

Implementations should ensure each node's SpaceGraphNode.edges array references the same instances that appear in edges, so adjacency walks stay O(degree) without scanning the full edge list.

interface SpaceGraph {
    edges: readonly SpaceGraphEdge[];
    nodes: readonly SpaceGraphNode[];
    nodesById: ReadonlyMap<string, SpaceGraphNode>;
}

Properties

Properties

edges: readonly SpaceGraphEdge[]

All portals in the graph.

nodes: readonly SpaceGraphNode[]

All spaces in the graph.

nodesById: ReadonlyMap<string, SpaceGraphNode>

O(1) node lookup by SpaceGraphNode.id.