Cubic buildings