Exemplo n.º 1
0
        private void view_z_MouseUp(object sender, MouseEventArgs e)
        {
            if (this.drawMode == eDrawMode.NONE || p1 == null)
            {
                return;
            }
            _tmpObject = null;

            p2 = new Points();

            p2.X = e.X;
            p2.Y = e.Y;
            p2.Z = 0;

            Util.convertToMy(p2, vp, view_z.Image, Util.eView.z);

            AObjects s = null;

            switch (this.drawMode)
            {
            case eDrawMode.SPHERE:
                s = Sphere.create_z((Points)p1.Clone(), (Points)p2.Clone(), vp);
                break;

            case eDrawMode.CYLINDER:
                s = Cylinder.create_z((Points)p1.Clone(), (Points)p2.Clone(), vp);
                break;

            case eDrawMode.LIGHT:
                s = Light.create_z((Points)p1.Clone(), (Points)p2.Clone(), vp);
                break;

            case eDrawMode.CONE:
                s = Cone.create_z((Points)p1.Clone(), (Points)p2.Clone(), vp);
                break;

            case eDrawMode.PLAN:
                s = Plan.create_z((Points)p1.Clone(), (Points)p2.Clone(), vp);
                break;
            }
            if (s != null)
            {
                ol.Add(s);
                ol.Selected = s;
            }

            redraw();
            propertyGrid.Refresh();
        }
Exemplo n.º 2
0
Arquivo: Cone.cs Projeto: isundil/drt
 Cone(Cone o)
     : base(o)
 {
     this.Height = o.Height;
 }