internal BSPTree(IList<BSPNode> nodes) { this.nodes = nodes.ToArray(); rootId = FindRootNode(nodes); if (rootId == short.MinValue) { throw new InvalidDataException("No root node found for this BSP tree."); } }