コード例 #1
0
 /// <summary>
 /// Initialize from pre-existing viewer
 /// </summary>
 /// <param name="v">viewer</param>
 public RenderLoop(Parsley.Draw3D.Viewer v) {
   _v = v;
   _fts = new FixedTimeStep();
   _bw = new BackgroundWorker();
   _bw.WorkerSupportsCancellation = true;
   _bw.DoWork += new DoWorkEventHandler(_bw_DoWork);
   _event_lock = new object();
   _stopped = new ManualResetEvent(false);
 }
コード例 #2
0
ファイル: FrameGrabber.cs プロジェクト: guozanhua/parsley
 /// <summary>
 /// Initialize frame grabber with camera
 /// </summary>
 /// <param name="camera"></param>
 public FrameGrabber(Camera camera) {
   _camera = camera;
   _lock_event = new object();
   _fts = new FixedTimeStep(30);
   _bw = new BackgroundWorker();
   _bw.WorkerSupportsCancellation = true;
   _bw.DoWork += new DoWorkEventHandler(_bw_DoWork);
   _bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_bw_RunWorkerCompleted);
   _stopped = new ManualResetEvent(false);
 }
コード例 #3
0
ファイル: RenderLoop.cs プロジェクト: thystonius/parsley
 /// <summary>
 /// Initialize from pre-existing viewer
 /// </summary>
 /// <param name="v">viewer</param>
 public RenderLoop(Parsley.Draw3D.Viewer v)
 {
     _v   = v;
     _fts = new FixedTimeStep();
     _bw  = new BackgroundWorker();
     _bw.WorkerSupportsCancellation = true;
     _bw.DoWork += new DoWorkEventHandler(_bw_DoWork);
     _event_lock = new object();
     _stopped    = new ManualResetEvent(false);
 }
コード例 #4
0
 /// <summary>
 /// Initialize frame grabber with camera
 /// </summary>
 /// <param name="camera"></param>
 public FrameGrabber(Camera camera) //constructor
 {
     _camera     = camera;
     _lock_event = new object();
     _fts        = new FixedTimeStep(30);
     _bw         = new BackgroundWorker();
     _bw.WorkerSupportsCancellation = true;
     _bw.DoWork             += new DoWorkEventHandler(_bw_DoWork);
     _bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_bw_RunWorkerCompleted);
     _stopped = new ManualResetEvent(false);
 }