BSP building function and documentation for it