示例#1
0
        public Train(float[] luzBrillo, int shininess)
        {
            this.LuzBrillo = luzBrillo;
            this.Shininess = shininess;

            rectanguloTechoConductor = new Cuboide(ANCHO_TECHO, LARGO_TECHO, ALTO_TECHO, new Punto(-ANCHO_TECHO/2d, -0.25, ALTO_RECTANGULO), LUZ_ROJO, this.LuzBrillo, LUZ_ROJO, this.Shininess);
            rectanguloBase = new Cuboide(ANCHO_BASE, LARGO_BASE, ALTO_BASE, new Punto(-ANCHO_BASE / 2d, 0, -ALTO_BASE), LUZ_ROJO, this.LuzBrillo, LUZ_ROJO, this.Shininess);
            rectanguloConductor = new Cuboide(ANCHO_RECTANGULO, LARGO_RECTANULO, ALTO_RECTANGULO, new Punto(-ANCHO_RECTANGULO / 2d, 0, 0), LUZ_AZUL, this.LuzBrillo, LUZ_AZUL, this.Shininess);
            rectanguloParagolpe = new Cuboide(ANCHO_PARAGOLPE, LARGO_PARAGOLPE, ALTO_PARAGOLPE, new Punto(-ANCHO_PARAGOLPE / 2d, LARGO_BASE, -ALTO_PARAGOLPE), LUZ_ROJO, this.LuzBrillo, LUZ_ROJO, this.Shininess);

            ruedas = new List<Rueda>();

            ruedas.Add(new Rueda(this.CalcularPuntoCentroRueda(true, true), AnguloRotacionRuedas, RADIO_INTERNO_RUEDAS, RADIO_EXTERNO_RUEDAS, ANCHO_RUEDAS, LUZ_NEGRO, this.LuzBrillo, LUZ_NEGRO, this.Shininess));
            ruedas.Add(new Rueda(this.CalcularPuntoCentroRueda(true, false), AnguloRotacionRuedas, RADIO_INTERNO_RUEDAS, RADIO_EXTERNO_RUEDAS, ANCHO_RUEDAS, LUZ_NEGRO, this.LuzBrillo, LUZ_NEGRO, this.Shininess));
            ruedas.Add(new Rueda(this.CalcularPuntoCentroRueda(false, true), AnguloRotacionRuedas, RADIO_INTERNO_RUEDAS, RADIO_EXTERNO_RUEDAS, ANCHO_RUEDAS, LUZ_NEGRO, this.LuzBrillo, LUZ_NEGRO, this.Shininess));
            ruedas.Add(new Rueda(this.CalcularPuntoCentroRueda(false, false), AnguloRotacionRuedas, RADIO_INTERNO_RUEDAS, RADIO_EXTERNO_RUEDAS, ANCHO_RUEDAS, LUZ_NEGRO, this.LuzBrillo, LUZ_NEGRO, this.Shininess));

            guardabarroTren = new GuardabarroTren(ANCHO_GUARDABARROS, LARGO_GUARDABARROS, ALTO_GUARDABARROS, new Punto(-ANCHO_GUARDABARROS / 2d, LARGO_BASE + LARGO_PARAGOLPE, -ALTO_PARAGOLPE - ALTO_GUARDABARROS + 0.2), LUZ_ROJO, LUZ_ROJO, this.LuzBrillo, this.Shininess);
        }
示例#2
0
        public Train(float[] luzBrillo, int shininess)
        {
            this.LuzBrillo = luzBrillo;
            this.Shininess = shininess;

            rectanguloTechoConductor = new Cuboide(ANCHO_TECHO, LARGO_TECHO, ALTO_TECHO, new Punto(-ANCHO_TECHO / 2d, -0.25, ALTO_RECTANGULO), LUZ_ROJO, this.LuzBrillo, LUZ_ROJO, this.Shininess);
            rectanguloBase           = new Cuboide(ANCHO_BASE, LARGO_BASE, ALTO_BASE, new Punto(-ANCHO_BASE / 2d, 0, -ALTO_BASE), LUZ_ROJO, this.LuzBrillo, LUZ_ROJO, this.Shininess);
            rectanguloConductor      = new Cuboide(ANCHO_RECTANGULO, LARGO_RECTANULO, ALTO_RECTANGULO, new Punto(-ANCHO_RECTANGULO / 2d, 0, 0), LUZ_AZUL, this.LuzBrillo, LUZ_AZUL, this.Shininess);
            rectanguloParagolpe      = new Cuboide(ANCHO_PARAGOLPE, LARGO_PARAGOLPE, ALTO_PARAGOLPE, new Punto(-ANCHO_PARAGOLPE / 2d, LARGO_BASE, -ALTO_PARAGOLPE), LUZ_ROJO, this.LuzBrillo, LUZ_ROJO, this.Shininess);

            ruedas = new List <Rueda>();

            ruedas.Add(new Rueda(this.CalcularPuntoCentroRueda(true, true), AnguloRotacionRuedas, RADIO_INTERNO_RUEDAS, RADIO_EXTERNO_RUEDAS, ANCHO_RUEDAS, LUZ_NEGRO, this.LuzBrillo, LUZ_NEGRO, this.Shininess));
            ruedas.Add(new Rueda(this.CalcularPuntoCentroRueda(true, false), AnguloRotacionRuedas, RADIO_INTERNO_RUEDAS, RADIO_EXTERNO_RUEDAS, ANCHO_RUEDAS, LUZ_NEGRO, this.LuzBrillo, LUZ_NEGRO, this.Shininess));
            ruedas.Add(new Rueda(this.CalcularPuntoCentroRueda(false, true), AnguloRotacionRuedas, RADIO_INTERNO_RUEDAS, RADIO_EXTERNO_RUEDAS, ANCHO_RUEDAS, LUZ_NEGRO, this.LuzBrillo, LUZ_NEGRO, this.Shininess));
            ruedas.Add(new Rueda(this.CalcularPuntoCentroRueda(false, false), AnguloRotacionRuedas, RADIO_INTERNO_RUEDAS, RADIO_EXTERNO_RUEDAS, ANCHO_RUEDAS, LUZ_NEGRO, this.LuzBrillo, LUZ_NEGRO, this.Shininess));

            guardabarroTren = new GuardabarroTren(ANCHO_GUARDABARROS, LARGO_GUARDABARROS, ALTO_GUARDABARROS, new Punto(-ANCHO_GUARDABARROS / 2d, LARGO_BASE + LARGO_PARAGOLPE, -ALTO_PARAGOLPE - ALTO_GUARDABARROS + 0.2), LUZ_ROJO, LUZ_ROJO, this.LuzBrillo, this.Shininess);
        }