/*A building that is half one style and half another, heights configurable.*/ FLOORS = 93;//taller section BFLOORS = 75;//shorter section SIZE = 1.0; //textures win = new UniformTexture(); win.diffuseColor.setRGB(0.3, 0.3, 0.3); win.specularity = 0.3f; win.shininess = 1.0f; light = new UniformTexture(); light.diffuseColor.setRGB(0.8, 0.7, 0.6); dark = new UniformTexture(); dark.diffuseColor.setRGB(0.3, 0.3, 0.3); //first style box = new Cube(SIZE*15, SIZE*FLOORS, SIZE*15); box.setTexture(win, win.getDefaultMapping(box)); p = new Vec3(SIZE*7.5, SIZE*FLOORS/2.0, 0.0); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); box = new Cube(SIZE/2.0, SIZE*FLOORS, SIZE*15.5); box.setTexture(light, light.getDefaultMapping(box)); for (i=1; i<15; i++) { p = new Vec3(SIZE*i, SIZE*FLOORS/2.0, 0.0); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(SIZE*7.5, SIZE*FLOORS/2.0, SIZE*i-SIZE*7.5); script.addObject(box, new CoordinateSystem(p, 0, 90, 0)); } box = new Cube(SIZE/2.0, SIZE*FLOORS, SIZE/2.0); box.setTexture(light, light.getDefaultMapping(box)); p = new Vec3(0.0, SIZE*FLOORS/2.0, SIZE*7.5); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(0.0, SIZE*FLOORS/2.0, -SIZE*7.5); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(SIZE*15, SIZE*FLOORS/2.0, -SIZE*7.5); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); p = new Vec3(SIZE*15, SIZE*FLOORS/2.0, SIZE*7.5); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); box = new Cube(SIZE*15.5, SIZE*0.5, SIZE*15.5); box.setTexture(light, light.getDefaultMapping(box)); for (i=0; i<=FLOORS; i++) { p = new Vec3(SIZE*7.5, SIZE*i+SIZE*0.25, 0.0); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); } //second style box = new Cube(SIZE*16, SIZE*BFLOORS, SIZE*12); box.setTexture(win, win.getDefaultMapping(box)); p = new Vec3(-SIZE*8, SIZE*BFLOORS/2.0, 0.0); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); box = new Cube(SIZE*0.1, SIZE*BFLOORS, SIZE*12.1); box.setTexture(dark, dark.getDefaultMapping(box)); for (i=1; i<16; i++) { p = new Vec3(-SIZE*i, SIZE*BFLOORS/2.0, 0.0); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); } box = new Cube(SIZE*16.1, SIZE*BFLOORS, SIZE*0.1); box.setTexture(dark, dark.getDefaultMapping(box)); for (i=-5; i<=5; i++) { p = new Vec3(-SIZE*8, SIZE*BFLOORS/2.0, SIZE*i); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); } box = new Cube(SIZE*16.1, SIZE*0.3, SIZE*12.1); box.setTexture(dark, dark.getDefaultMapping(box)); for (i=0; i<=BFLOORS; i++) { p = new Vec3(-SIZE*8, SIZE*i+SIZE*0.15, 0.0); script.addObject(box, new CoordinateSystem(p, 0, 0, 0)); }