예제 #1
0
 private void endCalibrationProcess()
 {
     m_CalibratorForm = null;
     m_WiiMoteWrapper.InfraRedAppearedEvent -= buildInfraRedCalibrationArray;
     setCalibratedWarperData();
     m_IsCalibrated = true;
     if (CalibrateFinishedEvent != null)
     {
         CalibrateFinishedEvent(this, EventArgs.Empty);
     }
 }
예제 #2
0
 public void CalibrateScreen(WiiMoteWrapper i_WiiMoteWrapper)
 {
     if (m_CalibratorForm == null)
     {
         m_CalibratorForm            = new CalibrationForm(m_WiiMoteWrapper);
         m_IsCalibrated              = false;
         m_WiiMoteWrapper            = i_WiiMoteWrapper;
         m_CurrentCalibrationCounter = 0;
         buildStaticCalibrationArray();
         m_WiiMoteWrapper.InfraRedAppearedEvent         += buildInfraRedCalibrationArray;
         m_CalibratorForm.FormClosed                    += onCalibrationFormClosed;
         m_CalibratorForm.CalibrationHeightChangedEvent += onCalibrationAreaChanged;
         m_CalibratorForm.Show();
     }
 }
예제 #3
0
 public Calibrator(WiiMoteWrapper i_WiiMoteWraper)
 {
     m_IsCalibrated = false;
     m_CurrentCalibrationCounter = 0;
     m_TopCalibrationMargin      = 0;
     m_ScreenWidth               = Screen.PrimaryScreen.Bounds.Width;
     m_ScreenHeight              = Screen.PrimaryScreen.Bounds.Height;
     m_StaticCalibrationArrayX   = new float[4];
     m_StaticCalibrationArrayY   = new float[4];
     m_InfraRedCalibrationArrayX = new float[4];
     m_InfraRedCalibrationArrayY = new float[4];
     m_Warper         = new Warper();
     m_WiiMoteWrapper = i_WiiMoteWraper;
     m_CalibratorForm = null;
 }
예제 #4
0
 private void onCalibrationFormClosed(object i_Sender, EventArgs i_Args)
 {
     m_WiiMoteWrapper.InfraRedAppearedEvent -= buildInfraRedCalibrationArray;
     m_CalibratorForm = null;
 }