Beispiel #1
0
 //poruszanie obiektem
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Up)
     {
         ModelGrid.RotateX(-moveit);
         e.Handled = true;
     }
     else if (e.Key == Key.Down)
     {
         ModelGrid.RotateX(moveit);
         e.Handled = true;
     }
     else if (e.Key == Key.Right)
     {
         ModelGrid.RotateY(moveit);
         e.Handled = true;
     }
     else if (e.Key == Key.Left)
     {
         ModelGrid.RotateY(-moveit);
         e.Handled = true;
     }
 }