/// <summary>
 /// Should the camera move up or down?</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to move the camera up or down</returns>
 /// <remarks>This is used by the fly and walk camera controllers.</remarks>
 public override bool IsElevating(Keys modifierKeys, MouseEventArgs e)
 {
     return
         (e.Button == MouseButtons.Middle && (modifierKeys & Keys.Alt) == Keys.Alt) ||
         (e.Button == MouseButtons.Left &&
             (modifierKeys & (Keys.Alt | Keys.Control)) == (Keys.Alt | Keys.Control));
 }
 /// <summary>
 /// Should the camera do a panning (strafing) motion?</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to pan the camera</returns>
 public override bool IsPanning(Keys modifierKeys, MouseEventArgs e)
 {
     return
         e.Button == MouseButtons.Middle ||
         (e.Button == MouseButtons.Left &&
             (modifierKeys & (Keys.Alt | Keys.Control)) == (Keys.Alt | Keys.Control));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Does the user want to control the camera in some way?
 /// (As opposed to selecting something in the Design View, for example.)</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to adjust the camera</returns>
 public virtual bool IsControllingCamera(Keys modifierKeys, MouseEventArgs e)
 {
     return
         IsRotating(modifierKeys, e) ||
         IsZooming(modifierKeys, e) ||
         IsPanning(modifierKeys, e) ||
         IsTurning(modifierKeys, e) ||
         IsElevating(modifierKeys, e);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Should the camera move up or down?</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to move the camera up or down</returns>
 /// <remarks>This is used by the fly and walk camera controllers.</remarks>
 public override bool IsElevating(Keys modifierKeys, MouseEventArgs e)
 {
     return e.Button == MouseButtons.Middle && (modifierKeys & Keys.Alt) == Keys.Alt;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Should the camera zoom in some way?</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to zoom the camera</returns>
 public override bool IsZooming(Keys modifierKeys, MouseEventArgs e)
 {
     return
         (e.Button == MouseButtons.Right && (modifierKeys & Keys.Alt) == Keys.Alt) ||
         e.Delta != 0; //mouse wheel moved?
 }
Exemplo n.º 6
0
 /// <summary>
 /// Should the camera do a panning (strafing) motion?</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to pan the camera</returns>
 public override bool IsPanning(Keys modifierKeys, MouseEventArgs e)
 {
     return e.Button == MouseButtons.Middle;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Should the camera rotate around the look-at point?</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to rotate the camera</returns>
 public override bool IsRotating(Keys modifierKeys, MouseEventArgs e)
 {
     return (e.Button == MouseButtons.Left && (modifierKeys & Keys.Alt) == Keys.Alt);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Should the camera move up or down?</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to move the camera up or down</returns>
 /// <remarks>This is used by the fly and walk camera controllers.</remarks>
 public abstract bool IsElevating(Keys modifierKeys, MouseEventArgs e);
Exemplo n.º 9
0
 /// <summary>
 /// Should the camera turn around in-place? This means that the look-at direction
 /// changes, but the eye point remains stationary.</summary>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's MouseEventArgs</param>
 /// <returns>True if the user wants to turn the camera around in place</returns>
 /// <remarks>This is used by the fly and walk camera controllers.</remarks>
 public abstract bool IsTurning(Keys modifierKeys, MouseEventArgs e);