Esempio n. 1
0
        public void AddVertice(double x, double y)
        {
            Vertice verticeNuevo = new Vertice(x, y);
            Vertice verticeAnterior = (this.Vertices.Count > 0) ? this.Vertices.Last<Vertice>() : null;

            this.Vertices.Add(verticeNuevo);

            // Si tengo mas de un vertice, puedo empezar a formar los planos.
            if (verticeAnterior != null)
                this.Planos.Add(new Plano(verticeAnterior, verticeNuevo));
        }
Esempio n. 2
0
 public Plano(Vertice verticeInicial, Vertice verticeFinal)
 {
     this.VerticeInicial = verticeInicial;
     this.VerticeFinal   = verticeFinal;
 }
Esempio n. 3
0
 public Plano(Vertice verticeInicial, Vertice verticeFinal)
 {
     this.VerticeInicial = verticeInicial;
     this.VerticeFinal = verticeFinal;
 }
Esempio n. 4
0
        private Vertice ConvertirVerticeAZona3(Vertice vertice)
        {
            double newX = (vertice.X - TOP_VIEW_POSX) / TOP_VIEW_W;
            double newY = ((W_HEIGHT - vertice.Y) - TOP_VIEW_POSY) / TOP_VIEW_H;

            return new Vertice(newX, newY);
        }
Esempio n. 5
0
        private Vertice ConvertirVerticeAZona2(Vertice vertice)
        {
            double newX = (vertice.X - HEIGHT_VIEW_POSX) / HEIGHT_VIEW_W;
            double newY = ((W_HEIGHT - vertice.Y) - HEIGHT_VIEW_POSY) / HEIGHT_VIEW_H;

            System.Console.Out.WriteLine("offsetX: " + newX + " offsetY: " + newY);
            System.Console.Out.WriteLine("W_HEIGHT: " + W_HEIGHT + " HEIGHT_VIEW_POSY: " + HEIGHT_VIEW_POSY + " HEIGHT_VIEW_H:" + HEIGHT_VIEW_H);
            System.Console.Out.WriteLine("W_HEIGHT- vertice.Y: " + (W_HEIGHT - vertice.Y));

            return new Vertice(newX, newY);
        }