예제 #1
0
 /// <summary>
 /// Is key an input key for camera motion?</summary>
 /// <param name="controlScheme">The control scheme instance to extend</param>
 /// <param name="key">Key to test</param>
 /// <returns>True iff key is input key for camera motion</returns>
 public static bool IsInputKey(this ControlScheme controlScheme, WfKeys key)
 {
     return(controlScheme.IsInputKey(KeysInterop.ToAtf(key)));
 }
예제 #2
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="controlScheme">The control scheme instance to extend</param>
 /// <param name="modifierKeys">The camera control's ModifierKeys property</param>
 /// <param name="e">The camera control's event handler's AtfMouseEventArgs</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 static bool IsTurning(this ControlScheme controlScheme, WfKeys modifierKeys, AtfMouseEventArgs e)
 {
     return(controlScheme.IsTurning(KeysInterop.ToAtf(modifierKeys), e));
 }
예제 #3
0
 /// <summary>
 /// Is the keyboard being used to move the camera? If the camera controller allows
 /// for this kind of control, then it can check in the OnKeyDown event handler if
 /// the user is intending to move the camera.</summary>
 /// <param name="controlScheme">The control scheme instance to extend</param>
 /// <param name="modifierKeys">The Control's ModifierKeys property</param>
 /// <param name="e">The key event from the KeyDown event handler, for example</param>
 /// <returns>True if the user is trying to move the camera using the keyboard</returns>
 public static bool IsControllingCamera(this ControlScheme controlScheme, WfKeys modifierKeys, WfKeyEventArgs e)
 {
     return(controlScheme.IsControllingCamera(KeysInterop.ToAtf(modifierKeys), KeyEventArgsInterop.ToAtf(e)));
 }