예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     init();
     drawObjects(VCMaths.Change3Dto2D(objects, viewport));
 }
예제 #2
0
 private void KeyStrokeDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.W)
     {
         VCMaths.W_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.A)
     {
         VCMaths.A_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.S)
     {
         VCMaths.S_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.D)
     {
         VCMaths.D_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.Q)
     {
         VCMaths.Q_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.E)
     {
         VCMaths.E_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.Y)
     {
         VCMaths.Y_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.U)
     {
         VCMaths.U_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.H)
     {
         VCMaths.H_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.J)
     {
         VCMaths.J_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.N)
     {
         VCMaths.N_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.M)
     {
         VCMaths.M_Used(objects);
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.I)
     {
         viewport.perspective_coe += 10;
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
     else if (e.Key == Key.O)
     {
         viewport.perspective_coe -= 10;
         drawObjects(VCMaths.Change3Dto2D(objects, viewport));
     }
 }