Active Shapes for Automatic 3D Modeling of Buildings