예제 #1
0
 public override void DrawContents(DataRecordRaw rec)
 {
     if (rec != null)
     {
         chplaterec[0] = rec.accelmeter[0, 0];
         chplaterec[1] = rec.accelmeter[0, 1];
         chplaterec[2] = rec.accelmeter[1, 0];
         chplaterec[3] = rec.accelmeter[1, 1];
         dispch1.Push(new PanelMotionData {
             accel = new short[3] {
                 rec.accelmeter[0, 0], rec.accelmeter[0, 1], rec.accelmeter[0, 2],
             },
             gyro = new short[3] {
                 rec.gyro[0, 0], rec.gyro[0, 1], rec.gyro[0, 2]
             }
         });
         dispch2.Push(new PanelMotionData {
             accel = new short[3] {
                 rec.accelmeter[1, 0], rec.accelmeter[1, 1], rec.accelmeter[1, 2],
             },
             gyro = new short[3] {
                 rec.gyro[1, 0], rec.gyro[1, 1], rec.gyro[1, 2]
             }
         });
     }
     for (int i = 0; i < 4; i++)
     {
         chplatedisp[i] = 0.9 * chplatedisp[i] + 0.1 * 0.2 * chplaterec[i];
     }
     RendererWrapper.Set3D(new RectangleBox(boundingbox.left, boundingbox.left + boundingbox.Width * 0.5, boundingbox.bottom + boundingbox.Height * 0.3, boundingbox.top));
     RendererWrapper.DrawPlate3D(0.0, 0, chplatedisp[0], 0, chplatedisp[1], Globals.emgchannelcols[0]);
     RendererWrapper.Set2D();
     RendererWrapper.Set3D(new RectangleBox(boundingbox.left + boundingbox.Width * 0.5, boundingbox.right, boundingbox.bottom + boundingbox.Height * 0.3, boundingbox.top));
     RendererWrapper.DrawPlate3D(0.0, 0, chplatedisp[2], 0, chplatedisp[3], Globals.emgchannelcols[0]);
     RendererWrapper.Set2D();
     RendererWrapper.DrawGyroChannel(new RectangleBox(
                                         boundingbox.left + 20, boundingbox.left + boundingbox.Width * 0.5 - 20,
                                         boundingbox.bottom, boundingbox.bottom + boundingbox.Height * 0.3
                                         )
                                     , 0, boundingbox.Height * 0.25, ref dispch1);
     RendererWrapper.DrawGyroChannel(new RectangleBox(
                                         boundingbox.left + boundingbox.Width * 0.5 + 20, boundingbox.right - 20,
                                         boundingbox.bottom, boundingbox.bottom + boundingbox.Height * 0.3
                                         )
                                     , 0, boundingbox.Height * 0.25, ref dispch2);
 }
예제 #2
0
 static void on_reshape(int w, int h)
 {
     RendererWrapper.Set2D(w, h);
 }