Ejemplo n.º 1
0
    protected override void OnMouseMove(Rhino.Input.Custom.GetPointMouseEventArgs e)
    {
        Plane pl = m_cplane.Plane;

        pl.Origin      = e.Point;
        m_cplane.Plane = pl;
    }
Ejemplo n.º 2
0
            protected override void OnMouseMove(Rhino.Input.Custom.GetPointMouseEventArgs e)
            {
                switch (m_state)
                {
                case State.PickOrigin:
                    bPlane.Origin = e.Point;
                    cPlane.Plane  = bPlane;
                    break;

                case State.PickX:
                    cPlane.Plane = PlaneOrientXAxis(bPlane, e.Point);
                    break;

                case State.PickY:
                    cPlane.Plane = PlaneXAxisRotation(bPlane, e.Point);
                    break;
                }
            }
Ejemplo n.º 3
0
        protected override void OnMouseDown(Rhino.Input.Custom.GetPointMouseEventArgs e)
        {
            if (m_dc.PickResult.Mode != Rhino.UI.Gumball.GumballMode.None)
            {
                return;
            }
            m_dc.PickResult.SetToDefault();

            Rhino.Input.Custom.PickContext pick_context = new Rhino.Input.Custom.PickContext();
            pick_context.View      = e.Viewport.ParentView;
            pick_context.PickStyle = Rhino.Input.Custom.PickStyle.PointPick;
            var xform = e.Viewport.GetPickTransform(e.WindowPoint);

            pick_context.SetPickTransform(xform);
            Rhino.Geometry.Line pick_line;
            e.Viewport.GetFrustumLine(e.WindowPoint.X, e.WindowPoint.Y, out pick_line);
            pick_context.PickLine = pick_line;
            pick_context.UpdateClippingPlanes();
            // pick gumball and, if hit, set getpoint dragging constraints.
            m_dc.PickGumball(pick_context, this);
        }
Ejemplo n.º 4
0
        protected override void OnMouseMove(Rhino.Input.Custom.GetPointMouseEventArgs e)
        {
            if (m_dc.PickResult.Mode == Rhino.UI.Gumball.GumballMode.None)
            {
                return;
            }

            m_dc.CheckShiftAndControlKeys();
            Rhino.Geometry.Line world_line;
            if (!e.Viewport.GetFrustumLine(e.WindowPoint.X, e.WindowPoint.Y, out world_line))
            {
                world_line = Rhino.Geometry.Line.Unset;
            }

            bool rc = m_dc.UpdateGumball(e.Point, world_line);

            if (rc)
            {
                base.OnMouseMove(e);
            }
        }
 /// <summary>
 /// Mouse move event handler
 /// </summary>
 void PlatonicGetPoint_MouseMove(object sender, Rhino.Input.Custom.GetPointMouseEventArgs e)
 {
     m_draw = CalculateTransform(e.Viewport, e.Point, ref m_xform);
 }