public RotateAction(GL_ControlBase control, Point mousePos, Vector3 center, float draggingDepth)
 {
     this.control  = control;
     startMousePos = mousePos;
     this.center   = center;
     planeOrigin   = control.CoordFor(mousePos.X, mousePos.Y, draggingDepth);
     centerPoint   = control.ScreenCoordFor(center);
 }
 public TranslateAction(GL_ControlBase control, Point mousePos, Vector3 center, float draggingDepth)
 {
     this.control       = control;
     startMousePos      = mousePos;
     this.draggingDepth = draggingDepth;
     planeOrigin        = control.CoordFor(mousePos.X, mousePos.Y, draggingDepth);
     origin             = center;
 }
Exemplo n.º 3
0
 public override uint MouseClick(MouseEventArgs e, GL_ControlBase control)
 {
     if (WinInput.Keyboard.IsKeyDown(WinInput.Key.LeftCtrl) &&
         e.Button == MouseButtons.Right &&
         control.PickingDepth != control.ZFar)
     {
         control.CameraTarget = -control.CoordFor(e.Location.X, e.Location.Y, control.PickingDepth);
     }
     base.MouseDown(e, control);
     return(UPDATE_CAMERA);
 }