/*A grey block of a building with rounded corners.*/ FLOORS = 85; WIDTH = 24; //should be an even # SIZE = 1.0; YSIZE = 1.8; //textures win = new Texture[3]; for (i=0; i<3; i++) { win[i] = new UniformTexture(); win[i].shininess = 1.0f; win[i].specularity = .35f; } win[0].diffuseColor.setRGB(96.0/255, 97.0/255, 91.0/255); win[1].diffuseColor.setRGB(57.5/255, 58.5/255, 57.5/255); win[2].diffuseColor.setRGB(19.0/255, 20.0/255, 24.0/255); conc = new UniformTexture(); conc.diffuseColor.setRGB(156.0/255, 152.0/255, 140.0/255); //generate building FLOORS = FLOORS+1; //acount for double height top floor //windows box = new Cube((WIDTH-2)*SIZE, FLOORS*YSIZE, WIDTH*SIZE); box.setTexture(win[0], win[0].getDefaultMapping(box)); p = new Vec3(0.0, FLOORS*YSIZE/2.0, 0.0); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); script.addObject(box, new CoordinateSystem(p, 0, 90, 0)); cy = new Cylinder(FLOORS*YSIZE, SIZE, SIZE, 1.0); cy.setTexture(win[0], win[0].getDefaultMapping(cy)); x = (WIDTH-2)*SIZE/2.0; p = new Vec3(x, FLOORS*YSIZE/2.0, x); script.addObject(cy, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(-x, FLOORS*YSIZE/2.0, x); script.addObject(cy, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(x, FLOORS*YSIZE/2.0, -x); script.addObject(cy, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(-x, FLOORS*YSIZE/2.0, -x); script.addObject(cy, new CoordinateSystem(p, 0, 0, 0)); //horizontal bars for (i=0; i