VTKFIG  0.20.20181114
Easy VTK based in situ visualization
virtual void vtkfig::internals::MyInteractorStyle::OnMouseMove ( )
inlinevirtual

Overwrite mouse move.

If button is down, act, else pass to base class

Definition at line 337 of file vtkfigMainThread.cxx.

338  {
339 
340 
342  if (this->left_button_down)
343  {
344  // Calculate difference between old and
345  // new mouse position
346  int thisx=this->Interactor->GetEventPosition()[0];
347  int thisy=this->Interactor->GetEventPosition()[1];
348  int dx=thisx-lastx;
349  int dy=thisy-lasty;
350 
351  // Pass to all edited figures
352  for (auto figure:this->edited_figures)
353  figure->RTProcessMove(dx,dy);
354 
355  // Render changed figure
356  this->Interactor->Render();
357 
358  // Set new old position
359  lastx=thisx;
360  lasty=thisy;
361  }
362  else
363  vtkInteractorStyleTrackballCamera::OnMouseMove();
364  }
std::vector< Figure * > edited_figures
List of currently edited figures.