public MainClass(string[] args) { GlControl ViewPort = new GlControl(Width, Height); GlObjectList world = new GlObjectList(); world.Add(new LightSource()); #if !testingObjects world.Add(new TranslatedObject(new Point3D(0, -10, 0), new SkyBox())); GlObjectList casa = new GlObjectList(); casa.Add(new Casa2()); casa.Add(new Librero(new Point3D(210, 0, -318), 0)); casa.Add(new Librero(new Point3D(210, Librero.Height + .3, -316), -3)); casa.Add(new Lamp(new Point3D(60, 270, 190), 70)); casa.Add(new Refrigerador(new Point3D(-145, 0, 120), 180)); Plantilla obj = new Mesita(new Point3D(80, 0, 40), 90); casa.Add(obj); casa.Add(new TV(new Point3D(80, obj.Height + .2, 60), 0)); casa.Add(new Cama(new Point3D(370, 0, -250), 0, 100, 70)); casa.Add(new Cama(new Point3D(370, 0, -480), 0, 100, 60)); casa.Add(new Cama(new Point3D(-210, 0, -420), 0, 90, 40)); casa.Add(new Estante(new Point3D(-210, 170, -108))); obj = new Mesa(new Point3D(380, 0, 200)); casa.Add(obj); casa.Add(new Silla(new Point3D(440, 0, 160))); casa.Add(new Silla(new Point3D(440, 0, 240))); casa.Add(new Silla(new Point3D(330, 0, 160), 180)); casa.Add(new Silla(new Point3D(330, 0, 240), 180)); casa.Add(new Silla(new Point3D(385, 0, 110), 90)); casa.Add(new Silla(new Point3D(385, 0, 290), -90)); casa.Add(new Plato(new Point3D(380, obj.Height + .2, 200))); casa.Add(new Vaso(new Point3D(380, obj.Height + .2, 230))); casa.Add(new MesitaDeNoche(new Point3D(455, 0, -140), -90)); casa.Add(new MesitaDeNoche(new Point3D(455, 0, -380), -90)); casa.Add(new MesitaDeNoche(new Point3D(455, 0, -580), -90)); casa.Add(new MesitaDeNoche(new Point3D(-280, 0, -340), 90)); obj = new EstanteHorizontal(new Point3D(330, 0, -70), 180); casa.Add(obj); casa.Add(new Butaca(new Point3D(-30, 0, 200), 90, 2)); casa.Add(new Butaca(new Point3D(200, 0, 270), 250, 1)); casa.Add(new Butaca(new Point3D(200, 0, 110), -70, 1)); casa.Add(new MesetaConFregadero(new Point3D(-307, 0, -64), 0)); casa.Add(new Clock(new Point3D(485, 200, 325), 270)); GlObject c = new TranslatedObject(new Point3D(0, 0, -70), casa); world.Add(c); #endif observer = new Avatar(ViewPort, world); Glut.glutDisplayFunc(new Glut.DisplayCallback(observer.Look)); Glut.glutIdleFunc(new Glut.IdleCallback(observer.Look)); Glut.glutMainLoop(); }
public MainClass(string[] args) { GlControl ViewPort = new GlControl(Width, Height); GlObjectList world = new GlObjectList(); world.Add(new LightSource()); #if !testingObjects world.Add(new TranslatedObject(new Point3D(0, -10, 0), new SkyBox())); GlObjectList item = new GlObjectList(); item.Add(new Museum2()); item.Add(new RakPajangan(new Point3D(210, 0, -318), 0)); item.Add(new RakPajangan(new Point3D(210, RakPajangan.Height + .3, -318), 0)); item.Add(new TV(new Point3D(310, 135, -33), 180)); item.Add(new Lamp(new Point3D(60, 270, 190), 70)); item.Add(new Lamp(new Point3D(300, 270, 350), 70)); item.Add(new Lamp(new Point3D(350, 270, -500), 70)); item.Add(new Lamp(new Point3D(350, 270, -150), 70)); item.Add(new Lamp(new Point3D(-220, 270, -300), 70)); item.Add(new Lamp(new Point3D(-180, 270, 90), 70)); item.Add(new RakPajangan(new Point3D(-145, 0, -170), 0)); item.Add(new RakPajangan(new Point3D(-145, RakPajangan.Height, -170), 180)); item.Add(new teko(new Point3D(-175, 4, -125), 0)); item.Add(new teko1(new Point3D(-215, 24, -125), 0)); item.Add(new teko3(new Point3D(-215, -18, -125), 0)); item.Add(new RakPajangan(new Point3D(-225, 0, -170), 0)); item.Add(new RakPajangan(new Point3D(-225, RakPajangan.Height, -170), 180)); item.Add(new Cangkir(new Point3D(-225, 125, -165), 0)); item.Add(new Cangkir(new Point3D(-245, 105, -165), 0)); item.Add(new Cangkir(new Point3D(-205, 105, -165), 0)); item.Add(new Cangkir(new Point3D(-225, 85, -165), 0)); item.Add(new RakPajangan(new Point3D(400, 0, -635), 180)); item.Add(new RakPajangan(new Point3D(400, RakPajangan.Height, -635), 0)); item.Add(new teko5(new Point3D(430, 4, -638), 180)); item.Add(new teko2(new Point3D(470, 24, -638), 180)); item.Add(new teko4(new Point3D(470, -18, -638), 180)); item.Add(new RakPajangan(new Point3D(-235, 0, -635), 180)); item.Add(new RakPajangan(new Point3D(-235, RakPajangan.Height, -635), 0)); item.Add(new teko(new Point3D(-205, 4, -638), 180)); item.Add(new teko4(new Point3D(-165, 24, -638), 180)); item.Add(new teko2(new Point3D(-165, -18, -638), 180)); item.Add(new Pillar(new Point3D(-180, 70, -620), 180)); item.Add(new Pillar(new Point3D(-170, 60, -610), 180)); item.Add(new Pillar(new Point3D(-160, 50, -600), 180)); item.Add(new Pillar(new Point3D(-150, 40, -590), 180)); item.Add(new Pillar(new Point3D(-140, 30, -580), 180)); item.Add(new Pillar(new Point3D(-130, 20, -570), 180)); item.Add(new Pillar(new Point3D(-120, 10, -560), 180)); item.Add(new Pillar(new Point3D(-110, 0, -550), 180)); item.Add(new Pillar(new Point3D(-100, -10, -550), 180)); item.Add(new Pillar(new Point3D(-90, -20, -550), 180)); item.Add(new Pillar(new Point3D(-80, -30, -550), 180)); item.Add(new Pillar(new Point3D(-70, -40, -550), 180)); item.Add(new Pillar(new Point3D(-60, -40, -550), 180)); item.Add(new Pillar(new Point3D(-50, -30, -550), 180)); item.Add(new Pillar(new Point3D(-40, -20, -550), 180)); item.Add(new Pillar(new Point3D(-30, -10, -550), 180)); item.Add(new Pillar(new Point3D(-20, 0, -550), 180)); item.Add(new Pillar(new Point3D(-10, 10, -560), 180)); item.Add(new Pillar(new Point3D(0, 20, -570), 180)); item.Add(new Pillar(new Point3D(10, 30, -580), 180)); item.Add(new Pillar(new Point3D(20, 40, -590), 180)); item.Add(new Pillar(new Point3D(30, 50, -600), 180)); item.Add(new Pillar(new Point3D(40, 60, -610), 180)); item.Add(new Pillar(new Point3D(50, 70, -620), 180)); item.Add(new Pillar(new Point3D(60, 80, -630), 180)); item.Add(new Pillar(new Point3D(70, 70, -620), 180)); item.Add(new Pillar(new Point3D(80, 60, -610), 180)); item.Add(new Pillar(new Point3D(90, 50, -600), 180)); item.Add(new Pillar(new Point3D(100, 40, -590), 180)); item.Add(new Pillar(new Point3D(110, 30, -580), 180)); item.Add(new Pillar(new Point3D(120, 20, -570), 180)); item.Add(new Pillar(new Point3D(130, 10, -560), 180)); item.Add(new Pillar(new Point3D(140, 0, -550), 180)); item.Add(new Pillar(new Point3D(150, -10, -550), 180)); item.Add(new Pillar(new Point3D(160, -20, -550), 180)); item.Add(new Pillar(new Point3D(170, -30, -550), 180)); item.Add(new Pillar(new Point3D(180, -40, -550), 180)); item.Add(new Pillar(new Point3D(190, -40, -550), 180)); item.Add(new Pillar(new Point3D(200, -30, -550), 180)); item.Add(new Pillar(new Point3D(210, -20, -550), 180)); item.Add(new Pillar(new Point3D(220, -10, -550), 180)); item.Add(new Pillar(new Point3D(230, 0, -550), 180)); item.Add(new Pillar(new Point3D(240, 10, -560), 180)); item.Add(new Pillar(new Point3D(250, 20, -570), 180)); item.Add(new Pillar(new Point3D(260, 30, -580), 180)); item.Add(new Pillar(new Point3D(270, 40, -590), 180)); item.Add(new Pillar(new Point3D(280, 50, -600), 180)); item.Add(new Pillar(new Point3D(290, 60, -610), 180)); item.Add(new Pillar(new Point3D(300, 70, -620), 180)); Template obj = new Meja(new Point3D(380, 0, 200)); item.Add(obj); item.Add(new Painting(new Point3D(-240, 100, 80), 110)); item.Add(new Painting(new Point3D(-270, 100, -20), 110)); item.Add(new Painting(new Point3D(-200, 100, -100), 0)); item.Add(new Painting(new Point3D(-170, 100, 150), 180)); item.Add(new Painting(new Point3D(60, 100, -590), 0)); item.Add(new Painting(new Point3D(-90, 40, -530), 0)); item.Add(new Painting(new Point3D(210, 40, -530), 0)); item.Add(new Painting(new Point3D(-300, 100, -500), 90)); item.Add(new Clock(new Point3D(160, 200, 0), 0)); obj = new Resepsionis(new Point3D(160, 0, 50), 180); item.Add(obj); item.Add(new Bantal(new Point3D(220, 65, 450), 120)); item.Add(new Bantal(new Point3D(220, 65, 380), 120)); item.Add(new Bantal(new Point3D(220, 65, 520), 120)); item.Add(new Kursi(new Point3D(220, 0, 380), 180)); item.Add(new Kursi(new Point3D(220, 0, 450), 180)); item.Add(new Kursi(new Point3D(220, 0, 520), 180)); item.Add(new Piring(new Point3D(380, 108, 200))); item.Add(new MejaDisplay(new Point3D(455, 0, -380), -90)); item.Add(new Piring1(new Point3D(455, 95, -380), -90)); item.Add(new MejaDisplay(new Point3D(355, 0, -380), -90)); item.Add(new Piring5(new Point3D(355, 88, -380), -90)); item.Add(new MejaDisplay(new Point3D(255, 0, -380), -90)); item.Add(new Piring3(new Point3D(255, 88, -380), -90)); item.Add(new MejaDisplay(new Point3D(155, 0, -380), -90)); item.Add(new Piring4(new Point3D(155, 88, -380), -90)); obj = new MejaDisplay(new Point3D(330, 0, -70), 180); item.Add(obj); item.Add(new Sofa(new Point3D(350, 0, -280), 0, 2)); GlObject c = new TranslatedObject(new Point3D(0, 0, -70), item); world.Add(c); #endif observer = new Avatar(ViewPort, world); Glut.glutDisplayFunc(new Glut.DisplayCallback(observer.Look)); Glut.glutIdleFunc(new Glut.IdleCallback(observer.Look)); Glut.glutMainLoop(); }