private static float getBuildingSelectionHeight(Building building) { int render_level = building.getRenderLevel(); switch (render_level) { case Building.RENDER_START: return building.getBuildingTemplate().getStartSelectionHeight(); case Building.RENDER_HALFBUILT: return building.getBuildingTemplate().getHalfbuiltSelectionHeight(); case Building.RENDER_BUILT: return building.getBuildingTemplate().getBuiltSelectionHeight(); default: throw new RuntimeException(); } }
public final void visitBuilding(final Building building) { visitSelectable( building_visitor, building, building.getPositionZ(), getBuildingSelectionRadius(building), getBuildingSelectionHeight(building)); }