At a given time and place, the height of an object varies directly as the length of its shadow. If a flagpole 6 meters high casts a shadow 10 meters long, find the height of a building that casts a shadow 45 meters long.