Пример #1
0
        public override void Particular()
        {
            //Gl.glRotated(angle, 0, 1, 0);

            marco();
            Gl.glNormal3d(0, 0, 1);
            Gl.glEnable(Gl.GL_TEXTURE_2D);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture(textura));
            Gl.glColor3d(1, 1, 1);
            Gl.glBegin(Gl.GL_QUADS);
            Gl.glTexCoord2d(0, 0);
            Gl.glVertex3d(center.X, center.Y, center.Z);

            Gl.glTexCoord2d(1, 0);
            Gl.glVertex3d(center.X + ancho, center.Y, center.Z);

            Gl.glTexCoord2d(1, 1);
            Gl.glVertex3d(center.X + ancho, center.Y + alto, center.Z);

            Gl.glTexCoord2d(0, 1);
            Gl.glVertex3d(center.X, center.Y + alto, center.Z);

            Gl.glEnd();
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
        }
Пример #2
0
        protected override void Particular()
        {
//			Gl.glColor4d(0,.5,.5,.4);
//			Gl.glColor3d(0,.5,.5);
            Gl.glColor3d(1, 1, 1);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("WOOD1"));
            Gl.glPushMatrix();
            Gl.glTranslated(0.8f * 30, 0, 0);
            GlUtils.PintaOrtoedro(0.8f * 30, 0.6f * 30, 0.4f * 30);
            Gl.glTranslated(0, 0, 0.45f * 30);
            GlUtils.PintaOrtoedro(0.8f * 30, 0.6f * 30, 0.05f * 30);
            Gl.glTranslated(-0.7f * 30, 0, 0.06f * 30);
            Gl.glColor3d(.5, .5, .5);
            Glut.glutSolidSphere(0.05f * 30, 10, 10);
            Gl.glColor3d(1, 1, 1);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslated(-0.8f * 30, 0, 0);
            GlUtils.PintaOrtoedro(0.8f * 30, 0.6f * 30, 0.4f * 30);
            Gl.glTranslated(0, 0, 0.45f * 30);
            GlUtils.PintaOrtoedro(0.8f * 30, 0.6f * 30, 0.05f * 30);
            Gl.glTranslated(0.7f * 30, 0, 0.06f * 30);
            Gl.glColor3d(.5, .5, .5);
            Glut.glutSolidSphere(0.05f * 30, 10, 10);
            Gl.glPopMatrix();
            height = 36;
            Gl.glColor3d(1, 1, 1);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
        }
Пример #3
0
        protected void pintaPersiana()
        {
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, textureIndex);
            GlUtils.PintaOrtoedro(45, 10, 2, true);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
//			Gl.glBegin(Gl.GL_QUAD_STRIP);
//			Gl.glBindTexture(Gl.GL_TEXTURE_2D,textureIndex);
//			Gl.glNormal3d(-0.57,0.57,0.57);Gl.glTexCoord2d(0,1);Gl.glVertex3d(-0.45*100, 0.1*100, 0.02*100);
//			Gl.glNormal3d(-0.57,-0.57,0.57);Gl.glTexCoord2d(0,0);Gl.glVertex3d(-0.45*100, -0.1*100, 0.02*100);
//
//			Gl.glNormal3d(0.57,0.57,0.57);Gl.glTexCoord2d(0.34,1);Gl.glVertex3d(0.45*100, 0.1*100, 0.02*100);
//			Gl.glNormal3d(0.57,-0.57,0.57);Gl.glTexCoord2d(0.34,0);Gl.glVertex3d(0.45*100, -0.1*100, 0.02*100);
//
//			Gl.glNormal3d(0.57,0.57,-0.57);Gl.glTexCoord2d(0.5,1);Gl.glVertex3d(0.45*100, 0.1*100, -0.02*100);
//			Gl.glNormal3d(0.57,-0.57,-0.57);Gl.glTexCoord2d(0.5,0);Gl.glVertex3d(0.45*100, -0.1*100, -0.02*100);
//
//			Gl.glNormal3d(-0.57,0.57,-0.57);Gl.glTexCoord2d(0.84,1);Gl.glVertex3d(-0.45*100, 0.1*100, -0.02*100);
//			Gl.glNormal3d(-0.57,-0.57,-0.57);Gl.glTexCoord2d(0.84,0);Gl.glVertex3d(-0.45*100, -0.1*100, -0.02*100);
//
//			Gl.glNormal3d(-0.57,0.57,0.57);Gl.glTexCoord2d(1,1);Gl.glVertex3d(-0.45*100, 0.1*100, 0.02*100);
//			Gl.glNormal3d(-0.57,-0.57,0.57);Gl.glTexCoord2d(1,0);Gl.glVertex3d(-0.45*100, -0.1*100, 0.02*100);
//
//			Gl.glEnd();
//			Gl.glBegin(Gl.GL_QUADS);
//			Gl.glNormal3d(-0.57,-0.57,-0.57);Gl.glTexCoord2d(0.84,0);Gl.glVertex3d(-0.45*100, -0.1*100, -0.02*100);
//			Gl.glNormal3d(0.57,-0.57,-0.57);Gl.glTexCoord2d(0.5,0);Gl.glVertex3d(0.45*100, -0.1*100, -0.02*100);
//			Gl.glNormal3d(0.57,-0.57,0.57);Gl.glTexCoord2d(0.34,0);Gl.glVertex3d(0.45*100, -0.1*100, 0.02*100);
//			Gl.glNormal3d(-0.57,-0.57,0.57);Gl.glTexCoord2d(0,0);Gl.glVertex3d(-0.45*100, -0.1*100, 0.02*100);
//
//			Gl.glNormal3d(-0.57,0.57,-0.57);Gl.glTexCoord2d(0.84,1);Gl.glVertex3d(-0.45*100, 0.1*100, -0.02*100);
//			Gl.glNormal3d(0.57,0.57,-0.57);Gl.glTexCoord2d(0.34,1);Gl.glVertex3d(0.45*100, 0.1*100, -0.02*100);
//			Gl.glNormal3d(0.57,0.57,0.57);Gl.glTexCoord2d(0.34,1);Gl.glVertex3d(0.45*100, 0.1*100, 0.02*100);
//			Gl.glNormal3d(-0.57,0.57,0.57);Gl.glTexCoord2d(0,0);Gl.glVertex3d(-0.45*100, 0.1*100, 0.02*100);
//			Gl.glEnd();
        }
Пример #4
0
        protected override void Particular()
        {
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("old2"));
            Gl.glLightModeli(Gl.GL_LIGHT_MODEL_TWO_SIDE, 1);

            Glu.GLUquadric q = Glu.gluNewQuadric();
            Glu.gluQuadricTexture(q, Gl.GL_TRUE);
            Gl.glColor3d(1, 1, 1);
            Gl.glPushMatrix();
            Gl.glRotated(90, 1, 4, 0);
            Glu.gluDisk(q, 0, 5 * 3, 20, 20);
            Gl.glRotated(180, 1, 0, 0);
            Glu.gluCylinder(q, 5 * 3, 8 * 3, 3 * 3, 20, 20);
            Gl.glTranslated(0, 0, 2.5 * 3);
            Gl.glColor3d(0, 0, 0);

            Gl.glTranslated(0, 0, -2.5 * 3);
            Gl.glRotated(90, 1, 4, 0);
            Gl.glPopMatrix();
            yInc = 0;
            Gl.glColor3d(1, 1, 1);
            Glu.gluDeleteQuadric(q);
            Gl.glLightModeli(Gl.GL_LIGHT_MODEL_TWO_SIDE, 0);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
        }
Пример #5
0
        public void Act(char c)
        {
            double elapsed = DateTime.Now.Subtract(this.inicio).TotalSeconds;

            if (elapsed < this.Apertura / velocidad)
            {
                return;
            }
            if (HasActionFor(c) && this.Apertura != 0)
            {
                this.inicio = DateTime.Now;
                if (this.aperturaActual == this.aperturaActual)               //Hay que cerrar
                {
                    closing = true;
                    opening = false;
                }
                if (this.aperturaActual == 0)               //Hay que abrir
                {
                    closing = false;
                    opening = true;
                }
            }
            if (HasActionFor(c) && this.Apertura == 0)
            {
                GlUtils.Beep();
            }
        }
Пример #6
0
        protected override void Particular()
        {
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("madera"));
            Gl.glColor3d(.3, .3, .3);
            double alto = 45;

            Gl.glPushMatrix();
            Gl.glTranslated(-40, 0, -90);
            pintaPata(alto);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslated(40, 0, -90);
            pintaPata(alto);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslated(-40, 0, 90);
            pintaPata(alto);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslated(40, 0, 90);
            pintaPata(alto);
            Gl.glPopMatrix();

            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("rose"));
            Gl.glTranslated(0, alto, 0);
            Gl.glColor3d(.8, .6, .6);
            GlUtils.GambarBangun(50, alto / 10, 100);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
            height = 94.5;
            yInc   = 45;
            Gl.glColor3d(1, 1, 1);
        }
Пример #7
0
 public GlassWindow()
 {
     if (id < 0)
     {
         textureIndex = GlUtils.Texture("WOOD1");
         renderWindow();
     }
 }
Пример #8
0
 public Piso(double x1, double z1, double x2, double z2, double height)
 {
     this.x1     = Math.Min(x1, x2);
     this.x2     = Math.Max(x1, x2);
     this.z1     = Math.Min(z1, z2);
     this.z2     = Math.Max(z1, z2);
     this.height = height;
     textura     = GlUtils.Texture("PISO");
 }
Пример #9
0
 public Lantai(double x1, double z1, double x2, double z2, double tinggi)
 {
     this.x1     = Math.Min(x1, x2);
     this.x2     = Math.Max(x1, x2);
     this.z1     = Math.Min(z1, z2);
     this.z2     = Math.Max(z1, z2);
     this.tinggi = tinggi;
     textura     = GlUtils.Texture("FLOOR");
 }
Пример #10
0
        public override void Render()
        {
            Gl.glColor3d(1, 1, 1);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("COLCHON"));
            double h = 10;
            double d = 50;
            double w = 30;

            this.pintaColchon(w, h, d);
        }
Пример #11
0
 public Atap(double x1, double z1, double x2, double z2, double tinggi, double bawah)
 {
     this.x1     = Math.Min(x1, x2);
     this.x2     = Math.Max(x1, x2);
     this.z1     = Math.Min(z1, z2);
     this.z2     = Math.Max(z1, z2);
     this.tinggi = tinggi;
     this.bawah  = bawah;
     texturaIn   = GlUtils.Texture("ROOFIN");
     texturaOut  = GlUtils.Texture("ROOFOUT");
 }
Пример #12
0
 public Techo(double x1, double z1, double x2, double z2, double height, double bottom)
 {
     this.x1     = Math.Min(x1, x2);
     this.x2     = Math.Max(x1, x2);
     this.z1     = Math.Min(z1, z2);
     this.z2     = Math.Max(z1, z2);
     this.height = height;
     this.bottom = bottom;
     texturaIn   = GlUtils.Texture("TECHOIN");
     texturaOut  = GlUtils.Texture("TECHOOUT");
 }
Пример #13
0
        protected override void Particular()
        {
            Gl.glDisable(Gl.GL_TEXTURE_2D);
            Gl.glColor3d(1, 1, 1);

            GlUtils.PintaOrtoedro(0.7f * 40, 1.0f * 40, 0.7f * 40);

            Gl.glPushMatrix();
            Gl.glTranslated(0, 1.50f * 40, 0);
            GlUtils.PintaOrtoedro(0.7f * 40, 0.5f * 40, 0.7f * 40);
            Gl.glPopMatrix();

            Gl.glColor3d(0, 0, 0);

            GlUtils.pintaLineas(0.7f * 40, 1.0f * 40, 0.7f * 40);
            //pintaLineas(0.7f*40,1,0.7f);

            Gl.glPushMatrix();
            Gl.glTranslatef(0, 1.50f * 40, 0);
            GlUtils.pintaLineas(0.7f * 40, 0.5f * 40, 0.7f * 40);
            //pintaLineas(0.7f*40,0.5f*40,0.7f);
            Gl.glColor3d(1, 1, 1);
            Gl.glTranslatef(0, 0, 0.8f * 40);
            Gl.glRotated(90, 0, 0, 1);

            GlUtils.PintaOrtoedro(0.5f * 40, 0.7f * 40, 0.1f * 40);
            Gl.glColor3d(0, 0, 0);

            GlUtils.pintaLineas(0.5f * 40, 0.7f * 40, 0.1f * 40);
            //pintaLineas(0.5f*40,0.7f*40,0.1f);
            Gl.glColor3d(0, 0, 0);
            Gl.glTranslatef(-0.2f * 40, 0.5f * 40, 0.1f * 40);
            Gl.glRotated(90, 0, 1, 0);
            Glu.gluCylinder(Glu.gluNewQuadric(), 0.03f * 40, 0.05f * 40, 0.4f * 40, 10, 10);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslatef(0, 0, 0.8f * 40);
            Gl.glColor3d(1, 1, 1);

            GlUtils.PintaOrtoedro(0.7f * 40, 1.0f * 40, 0.1f * 40);
            Gl.glColor3d(0, 0, 0);

            GlUtils.pintaLineas(0.7f * 40, 1.0f * 40, 0.1f * 40);
            //pintaLineas(0.7f*40,1,0.1f);
            Gl.glTranslatef(-0.5f * 40, 0, 0.1f * 40);
            Gl.glRotated(90, -1, 0, 0);
            Glu.gluCylinder(Glu.gluNewQuadric(), 0.03f * 40, 0.05f * 40, 0.4f * 40, 10, 10);
            Gl.glPopMatrix();


            Gl.glEnable(Gl.GL_TEXTURE_2D);
            yInc = 40;
        }
Пример #14
0
        protected override void Particular()
        {
            Gl.glColor3d(1, 1, 1);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("old3"));
            Gl.glPushMatrix();
            double tph = 10;

            Gl.glTranslated(largo * 100 / 4, Height + tph * .8, -ancho * 100 / 2);
            Gl.glRotated(30, 0, 1, 0);
            Glut.glutSolidTeapot(10);
            Gl.glPopMatrix();
        }
Пример #15
0
 public static int Texture(string name)
 {
     try
     {
         return((int)GlUtils.KnownTextures[name]);
     }
     catch (Exception)
     {
         GlUtils.KnownTextures[name] = GlUtils.LoadTextureByName(name);
         return((int)GlUtils.KnownTextures[name]);
     }
 }
Пример #16
0
        protected override void Particular()
        {
            Gl.glColor3d(0.421875, 0.421875, 0.421875);
            GlUtils.GambarBangunUnstretched(150, 95, 5);
            Gl.glPushMatrix();
            Gl.glTranslated(0, -2, -30);
            Gl.glTranslated(0, 2, 40);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("paint"));
            Gl.glColor3d(0, 0, 0);
            GlUtils.GambarBangunUnstretched(145, 90, 0.5);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);

            Gl.glColor3d(0, 0, 0);
            GlUtils.GambarBangun(3, 2, 1);
            Gl.glTranslated(0, 2, 0);
            Gl.glTranslated(0, -2, 0);
            Gl.glPushMatrix();
            Gl.glColor3d(0.421875, 0.421875, 0.421875);
            Gl.glTranslated(-35, Math.Sqrt(3.0) * 35 + 2, 0);
            Gl.glRotated(0, 0, 0, 0);
            Gl.glRotated(0, 0, 0, 0);

            Glu.gluDisk(Glu.gluNewQuadric(), 0, 0.3, 10, 10);
            Gl.glTranslated(0, 0, 1);
            Glu.gluDisk(Glu.gluNewQuadric(), 0, 0.3, 10, 10);
            Gl.glRotated(30, 0, 1, 0);
            Gl.glRotated(90, 1, 0, 0);
            Gl.glPopMatrix();
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Gl.glTranslated(0, 35, -30);
            Gl.glColor3d(0, 0, 0);
            Gl.glRotated(90, 1, 0, 0);
            Gl.glRotated(60, 0, 1, 0);
            Gl.glRotated(-60, 0, 1, 0);
            Gl.glRotated(90, 1, 0, 0);
            Gl.glPopMatrix();

            Gl.glTranslated(Math.Sqrt(3.0) * 35, 70, -30);
            Gl.glRotated(-90, 1, 0, 0);
            Gl.glRotated(60, 0, 1, 0);
            Gl.glColor3d(0.421875, 0.421875, 0.421875);
            Glu.gluDisk(Glu.gluNewQuadric(), 0, 0.3, 10, 10);
            Gl.glTranslated(0, 0, 1);
            Glu.gluDisk(Glu.gluNewQuadric(), 0, 0.3, 10, 10);
            Gl.glRotated(-60, 0, 1, 0);
            Gl.glRotated(90, 1, 0, 0);

            Gl.glColor3d(1, 1, 1);
        }
Пример #17
0
        protected void renderLamp()
        {
            Gl.glGetBooleanv(Gl.GL_CULL_FACE, out cullFace);
            Gl.glDisable(Gl.GL_CULL_FACE);

            Glu.GLUquadric quadric;
            quadric = Glu.gluNewQuadric();

            Gl.glPushMatrix();
            Gl.glTranslated(0, 0, 0);
            #region cuerpo
//			Gl.glColor3d(1, 0, 0);
            //Gl.glColor3d(1, 0, 0);

            Gl.glPushMatrix();
            Gl.glTranslated(0, 25, 0);
            Gl.glRotated(-90, 1, 0, 0);
            Glu.gluCylinder(quadric, 5, 10, 10, 8, 10);
            Gl.glPopMatrix();
            #endregion cuerpo
            #region bombillo
            Gl.glPushMatrix();
            Gl.glTranslated(0, 25, 0);
            Gl.glRotated(90, 1, 0, 0);
            //Gl.glColor3d(.5,.5,.5);

            Glu.gluCylinder(quadric, 5, 5, 12, 8, 8);
            Gl.glPopMatrix();
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("bulb"));
            Gl.glPushMatrix();

            Gl.glColor3d(1, 1, 1);
            Gl.glTranslated(0, 8, 0);
            Glut.glutSolidSphere(10, 8, 8);
            Gl.glPopMatrix();
            #endregion bombillo;
            Gl.glPushMatrix();
            Gl.glEnable(Gl.GL_BLEND);
            Gl.glColor3d(.98, .58, .35);
            Gl.glClipPlane(Gl.GL_CLIP_PLANE0, plano);
            Gl.glEnable(Gl.GL_CLIP_PLANE0);
            Gl.glLightModeli(Gl.GL_LIGHT_MODEL_TWO_SIDE, 1);
            Glu.gluSphere(quadric, 30, 15, 10);
            Gl.glLightModeli(Gl.GL_LIGHT_MODEL_TWO_SIDE, 0);
            Gl.glPopMatrix();
            Gl.glDisable(Gl.GL_CLIP_PLANE0);
            Gl.glPopMatrix();
            if (cullFace != Gl.GL_FALSE)
            {
                Gl.glEnable(Gl.GL_CULL_FACE);
            }
        }
Пример #18
0
        protected override void customRenderer()
        {
            Gl.glCallList(this.idObject);

            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("AZULEJO"));
            Gl.glColor3d(0.1, 0.15, .1);

            double d = (int)this.distance / 50;

            Gl.glBegin(Gl.GL_QUADS);


            Gl.glEnd();
        }
Пример #19
0
        protected override void Particular()
        {
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("WOOD2"));
            //Gl.glColor3d(0.5,0.25,0);
            Glu.GLUquadric q = Glu.gluNewQuadric();
            Glu.gluQuadricNormals(q, Glu.GLU_SMOOTH);
            Glu.gluQuadricTexture(q, Gl.GL_TRUE);

            Gl.glColor3d(0.5, 0.25, 0);
            Gl.glPushMatrix();
            Gl.glTranslated(0.8f * 20, 0, 0);
            GlUtils.PintaOrtoedro(0.8f * 20, 1f * 20, 0.4f * 40);
            Gl.glTranslated(0, 0, 0.45f * 40);
            GlUtils.PintaOrtoedro(0.8f * 20, 1f * 20, 0.05f * 40);
            Gl.glTranslated(-0.7f * 20, 4, 0.06f * 40);
            //Glut.glutSolidSphere(0.05f*20,10,10);
            Gl.glColor3d(0.25, 0.25 / 2, 0);
            Glu.gluSphere(q, 1, 10, 10);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glColor3d(0.5, 0.25, 0);
            Gl.glTranslated(-0.8f * 20, 0, 0);
            GlUtils.PintaOrtoedro(0.8f * 20, 1f * 20, 0.4f * 40);
            Gl.glTranslated(0, 0, 0.45f * 40);
            GlUtils.PintaOrtoedro(0.8f * 20, 1f * 20, 0.05f * 40);
            Gl.glTranslated(0.7f * 20, 4, 0.06f * 40);
            Gl.glColor3d(0.25, 0.25 / 2, 0);
            Glu.gluSphere(q, 1, 10, 10);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glColor3d(0.5, 0.25, 0);
            Gl.glTranslated(-26, -20, 12);
            Gl.glRotated(90, 1, 0, 0);
            Gl.glColor3d(0.25, 0.25 / 2, 0);
            Glu.gluCylinder(q, 3, 2, 12, 20, 20);
            Gl.glTranslated(52, 0, 0);
            Glu.gluCylinder(q, 3, 2, 12, 20, 20);
            Gl.glTranslated(0, -22, 0);
            Glu.gluCylinder(q, 3, 2, 12, 20, 20);
            Gl.glTranslated(-52, 0, 0);
            Glu.gluCylinder(q, 3, 2, 12, 20, 20);
            Gl.glRotated(-90, 1, 0, 0);
            Gl.glTranslated(-26, 20, 2);
            Gl.glPopMatrix();
            yInc = 32;
            Gl.glColor3d(1, 1, 1);
            Glu.gluDeleteQuadric(q);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("WOOD1"));
        }
Пример #20
0
        protected override void Particular()
        {
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("piel"));
            Gl.glPushMatrix();
            Gl.glColor3d(1, 1, 1);
            Gl.glTranslatef(0, -0.05f * 70, 0);
            GlUtils.PintaOrtoedro(0.4f * 70, 0.05f * 70, 0.4f * 70, true);
            Gl.glPopMatrix();

            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("madera"));
            Gl.glColor3d(.5, .5, .5);
            Gl.glPushMatrix();
            Gl.glTranslatef(-0.3f * 70, -0.5f * 70, 0.3f * 70);
            GlUtils.PintaOrtoedro(0.05f * 70, 0.4f * 70, 0.05f * 70);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Gl.glTranslatef(0.3f * 70, -0.5f * 70, 0.3f * 70);
            GlUtils.PintaOrtoedro(0.05f * 70, 0.4f * 70, 0.05f * 70);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslatef(0.3f * 70, -0.5f * 70, -0.3f * 70);
            GlUtils.PintaOrtoedro(0.05f * 70, 0.4f * 70, 0.05f * 70);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslatef(-0.3f * 70, -0.5f * 70, -0.3f * 70);
            GlUtils.PintaOrtoedro(0.05f * 70, 0.4f * 70, 0.05f * 70);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Gl.glTranslatef(0.3f * 70, 0.2f * 70, 0.3f * 70);
            GlUtils.PintaOrtoedro(0.02f * 70, 0.2f * 70, 0.05f * 70);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslatef(0.3f * 70, 0.2f * 70, -0.3f * 70);
            GlUtils.PintaOrtoedro(0.02f * 70, 0.2f * 70, 0.05f * 70);
            Gl.glPopMatrix();

            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("piel"));
            Gl.glColor3d(1, 1, 1);
            Gl.glPushMatrix();
            Gl.glTranslatef(0.3f * 70, 0.6f * 70, 0);
            GlUtils.PintaOrtoedro(0.05f * 70, 0.2f * 70, 0.4f * 70);
            Gl.glColor3d(1, 1, 1);
            yInc = 0.9 * 70;
            Gl.glPopMatrix();

            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
        }
Пример #21
0
        protected override void Particular()
        {
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("cream"));
            Glu.GLUquadric q = Glu.gluNewQuadric();
            Glu.gluQuadricNormals(q, Glu.GLU_SMOOTH);
            Glu.gluQuadricTexture(q, Gl.GL_TRUE);
            Gl.glColor3d(1, 1, 1);

            GlUtils.GambarBangun(0.7f * 5, 1.0f * 160, 0.7f * 10);

            Gl.glPopMatrix();

            Gl.glEnable(Gl.GL_TEXTURE_2D);
            yInc = 20;
        }
Пример #22
0
        protected override void Particular()
        {
            Gl.glColor3d(.7, .7, .7);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("WOOD1"));
            Gl.glPushMatrix();
            Gl.glTranslated(-83.5, 0, 0);
            GlUtils.PintaOrtoedro(1.5, 35, 23);
            Gl.glTranslated(83.5 * 2, 0, 0);
            GlUtils.PintaOrtoedro(1.5, 35, 23);
            Gl.glTranslated(-83.5, 0, -2);
            GlUtils.PintaOrtoedro(82, 1, 16);
            Gl.glTranslated(0, -35, 2);
            //Gl.glPopMatrix();
            GlUtils.PintaOrtoedro(85, 1.5, 23);
            Gl.glTranslated(0, 70, 0);
            GlUtils.PintaOrtoedro(85, 1.5, 23);
            Gl.glTranslated(0, -35, -20);
            GlUtils.PintaOrtoedro(85, 35, 3);
            Gl.glTranslated(42, 0, 38);
            Gl.glColor3d(.5, .5, .5);
            GlUtils.PintaOrtoedro(43, 32, 1.5);
            Gl.glTranslated(-70, 0, 3.5);
            GlUtils.PintaOrtoedro(40, 32, 1.5);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Glu.GLUquadric q = Glu.gluNewQuadric();
            Glu.gluQuadricTexture(q, Gl.GL_TRUE);
            Gl.glColor3d(.3, .3, .3);
            Gl.glTranslated(-70, -35, 15);
            Gl.glRotated(90, 1, 0, 0);
            Glu.gluCylinder(q, 5, 2, 20, 20, 20);
            Gl.glRotated(-90, 1, 0, 0);
            Gl.glTranslated(0, 0, -30);
            Gl.glRotated(90, 1, 0, 0);
            Glu.gluCylinder(q, 5, 2, 20, 20, 20);
            Gl.glRotated(-90, 1, 0, 0);
            Gl.glTranslated(140, 0, 0);
            Gl.glRotated(90, 1, 0, 0);
            Glu.gluCylinder(q, 5, 2, 20, 20, 20);
            Gl.glRotated(-90, 1, 0, 0);
            Gl.glTranslated(0, 0, 30);
            Gl.glRotated(90, 1, 0, 0);
            Glu.gluCylinder(q, 5, 2, 20, 20, 20);
            Gl.glPopMatrix();

            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
        }
Пример #23
0
        protected override void Particular()
        {
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("rose"));
            Gl.glRotated(90, 1, 0, 0);
            Gl.glRotated(45, 0, 0, 1);
            Gl.glScaled(1, 1, 0.4);
            Glut.glutSolidTorus(0.5f * 30, 0.5 * 30, 40, 4);

            Gl.glScaled(1, 1, 1.5);
            Glut.glutSolidTorus(0.3f * 30, 0.3f * 30, 40, 40);

            Gl.glScaled(1, 1, 1);
            Glut.glutSolidSphere(0.2f * 30, 20, 20);
            height = 6.6;
            Gl.glColor3d(1, 1, 1);
        }
Пример #24
0
        public WodenWindow()
        {
            pangle = minAngle;
            if (idPersiana < 0)
            {
                textureIndex = GlUtils.Texture("WOOD1");
                idPersiana   = Gl.glGenLists(1);
                Gl.glNewList(idPersiana, Gl.GL_COMPILE);
                pintaPersiana();
                Gl.glEndList();

                idMarco = Gl.glGenLists(1);
                Gl.glNewList(idMarco, Gl.GL_COMPILE);
                pintaMarco();
                Gl.glEndList();
            }
        }
Пример #25
0
        public GlassWall(Point3D from, Point3D to, double bottom, double height) : base(from, to, bottom, height)
        {
            divTexture = GlUtils.Texture("WOOD1");
            double len = (to - from).Norm;

            this.glasshStep = len / Math.Floor(len / glasshStep);
            baseHeight      = height - glassvStep * Math.Floor(height / glassvStep);
            if (baseHeight < glassvStep)
            {
                baseHeight += glassvStep;
            }
            muro = new SolidWall(from, to, bottom, baseHeight);
            muro.CloseUp(true);
            cristalId = Gl.glGenLists(1);
            Gl.glNewList(cristalId, Gl.GL_COMPILE);
            pintaCristal();
            Gl.glEndList();
        }
Пример #26
0
        protected override void Particular()
        {
            Gl.glColor3d(0.4, 0.4, 0.4);
            GlUtils.pintaCuadroStrip(0.5f * 70, 0.04f * 70, 0.7f * 70, 1);
            Gl.glPushMatrix();
            Gl.glTranslated(0, 0.04f * 70, 0);
            GlUtils.pintaCuadro(0.5f * 70, 0, 0.7f * 70, 1);
            Gl.glPopMatrix();
            Gl.glPushMatrix();
            Gl.glTranslated(0, -0.04f * 70, 0);
            GlUtils.pintaCuadro(0.5f * 70, 0, 0.7f * 70, 1);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Gl.glTranslated(0.4f * 70, 0, 0.6f * 70);
            Gl.glRotated(90, 1, 0, 0);
            Glu.gluCylinder(Glu.gluNewQuadric(), 0.05f * 70, 0.03f * 70, 0.8f * 70, 20, 20);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Gl.glTranslated(-0.4f * 70, 0, 0.6f * 70);
            Gl.glRotated(90, 1, 0, 0);
            Glu.gluCylinder(Glu.gluNewQuadric(), 0.05f * 70, 0.03f * 70, 0.8f * 70, 20, 20);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Gl.glTranslated(0.4f * 70, 0, -0.6f * 70);
            Gl.glRotated(90, 1, 0, 0);
            Glu.gluCylinder(Glu.gluNewQuadric(), 0.05f * 70, 0.03f * 70, 0.8f * 70, 20, 20);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Gl.glTranslated(-0.4f * 70, 0, -0.6f * 70);
            Gl.glRotated(90, 1, 0, 0);
            Glu.gluCylinder(Glu.gluNewQuadric(), 0.05f * 70, 0.03f * 70, 0.8f * 70, 20, 20);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Gl.glTranslated(0, -0.4f * 70, 0);
            GlUtils.pintaCuadroStrip(0.45f * 70, 0.02f * 70, 0.65f * 70, 1);
            Gl.glPopMatrix();
            yInc = 56;
            Gl.glColor3d(1, 1, 1);
        }
Пример #27
0
 public Puerta(Point3D position, double angle)
 {
     textureIndex   = GlUtils.Texture("ROSEGOLD");
     texturaBisagra = GlUtils.Texture("BISAGRA");
     texturaPuerta  = GlUtils.Texture("PUERTA");
     texturaKnob    = GlUtils.Texture("ROSEGOLD");
     this.position  = position;
     this.angle     = angle;
     if (idPuerta == -1)
     {
         idPuerta = Gl.glGenLists(2);
         Gl.glNewList(idPuerta, Gl.GL_COMPILE);
         this.pintaPuerta();
         Gl.glEndList();
         Gl.glNewList(idPuerta + 1, Gl.GL_COMPILE);
         this.pintaBisagra();
         Gl.glEndList();
     }
 }
Пример #28
0
        protected override void Particular()
        {
            Gl.glColor3d(.7, .7, .7);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("rose"));
            Gl.glPushMatrix();
            Gl.glTranslated(-103.5, 0, 0);
            GlUtils.GambarBangun(1.5, 55, 33);
            Gl.glTranslated(103.5 * 2, 0, 0);
            GlUtils.GambarBangun(1.5, 55, 33);
            Gl.glTranslated(-103.5, 0, -2);
            GlUtils.GambarBangun(82, 1, 20);
            Gl.glTranslated(0, -20, 2);
            GlUtils.GambarBangun(105, 1.5, 33);
            Gl.glTranslated(0, 70, 0);
            GlUtils.GambarBangun(105, 1.5, 33);
            Gl.glTranslated(0, -35, -20);
            GlUtils.GambarBangun(105, 55, 3);
            Gl.glTranslated(42, 0, 38);
            Gl.glColor3d(.5, .5, .5);
            GlUtils.GambarBangun(43, 55, 1.5);
            Gl.glTranslated(-70, 0, 3.5);
            GlUtils.GambarBangun(40, 32, 1.5);
            Gl.glPopMatrix();

            Gl.glPushMatrix();
            Glu.GLUquadric q = Glu.gluNewQuadric();
            Glu.gluQuadricTexture(q, Gl.GL_TRUE);
            Gl.glColor3d(.3, .3, .3);
            Gl.glTranslated(-70, -35, 15);
            Gl.glRotated(90, 1, 0, 0);
            Gl.glRotated(-90, 1, 0, 0);
            Gl.glTranslated(0, 0, -30);
            Gl.glRotated(90, 1, 0, 0);
            Gl.glRotated(-90, 1, 0, 0);
            Gl.glTranslated(140, 0, 0);
            Gl.glRotated(90, 1, 0, 0);
            Gl.glRotated(-90, 1, 0, 0);
            Gl.glTranslated(0, 0, 30);
            Gl.glRotated(90, 1, 0, 0);
            Gl.glPopMatrix();

            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);
        }
Пример #29
0
        protected override void customRenderer()
        {
            Gl.glCallList(this.idObject);

            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("AZULEJO"));
            Gl.glColor3d(0.1, 0.15, .1);

            double d = (int)this.distance / 50;

            Gl.glBegin(Gl.GL_QUADS);

            //pared

            Gl.glNormal3d(0, 0, 1); Gl.glTexCoord2d(0, 0); Gl.glVertex3d(0, alto * 100, -ancho * 100 + d);
            Gl.glNormal3d(0, 0, 1); Gl.glTexCoord2d(12, 0); Gl.glVertex3d(largo * 100, alto * 100, -ancho * 100 + d);
            Gl.glNormal3d(0, 0, 1); Gl.glTexCoord2d(12, 5); Gl.glVertex3d(largo * 100, (alto + 0.5) * 100, -ancho * 100 + d);
            Gl.glNormal3d(0, 0, 1); Gl.glTexCoord2d(0, 5); Gl.glVertex3d(0, (alto + 0.5) * 100, -ancho * 100 + d);

            //pared derecha

            Gl.glNormal3d(-1, 0, 0); Gl.glTexCoord2d(0, 0); Gl.glVertex3d(largo * 100 - d, alto * 100, -ancho * 100);
            Gl.glNormal3d(-1, 0, 0); Gl.glTexCoord2d(5, 0); Gl.glVertex3d(largo * 100 - d, alto * 100, 0);
            Gl.glNormal3d(-1, 0, 0); Gl.glTexCoord2d(5, 5); Gl.glVertex3d(largo * 100 - d, (alto + 0.5) * 100, 0);
            Gl.glNormal3d(-1, 0, 0); Gl.glTexCoord2d(0, 5); Gl.glVertex3d(largo * 100 - d, (alto + 0.5) * 100, -ancho * 100);

            //pared izquierda

            Gl.glNormal3d(1, 0, 0); Gl.glTexCoord2d(0, 5); Gl.glVertex3d(d, (alto + 0.5) * 100, -ancho * 100);
            Gl.glNormal3d(1, 0, 0); Gl.glTexCoord2d(5, 5); Gl.glVertex3d(d, (alto + 0.5) * 100, 0);
            Gl.glNormal3d(1, 0, 0); Gl.glTexCoord2d(5, 0); Gl.glVertex3d(d, alto * 100, 0);
            Gl.glNormal3d(1, 0, 0); Gl.glTexCoord2d(0, 0); Gl.glVertex3d(d, alto * 100, -ancho * 100);

            if (lead > 0)
            {
                Gl.glNormal3d(1, 0, 0); Gl.glTexCoord2d(0, 6); Gl.glVertex3d(d, (alto) * 100, 0);
                Gl.glNormal3d(1, 0, 0); Gl.glTexCoord2d(lead * 5, 6); Gl.glVertex3d(d, (alto) * 100, lead * 100);
                Gl.glNormal3d(1, 0, 0); Gl.glTexCoord2d(lead * 5, 0); Gl.glVertex3d(d, 0, lead * 100);
                Gl.glNormal3d(1, 0, 0); Gl.glTexCoord2d(0, 0); Gl.glVertex3d(d, 0, 0);
            }

            Gl.glEnd();
        }
Пример #30
0
        protected override void Particular()
        {
            Gl.glPushMatrix();
            double w = 17;

            Gl.glColor3d(1, 1, 1);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, GlUtils.Texture("rose"));
            Gl.glBegin(Gl.GL_QUADS);
            Gl.glNormal3d(0, 0, 1);
            Gl.glTexCoord2d(0, 0); Gl.glVertex3d(-w, -w, 0);
            Gl.glTexCoord2d(1, 0); Gl.glVertex3d(w, -w, 0);
            Gl.glTexCoord2d(1, 1); Gl.glVertex3d(w, w, 0);
            Gl.glTexCoord2d(0, 1); Gl.glVertex3d(-w, w, 0);
            Gl.glEnd();
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, 0);

            Gl.glColor3d(.1, 0, 0);
            Glut.glutSolidTorus(3, 19, 30, 40);
            Glut.glutSolidTorus(4, 23, 10, 6);
            Gl.glPopMatrix();
        }