[vtk-developers] Timer in vtkOpenVRRenderWindowInteractor

Florence8627 florence.wang at csiro.au
Tue Oct 17 01:24:26 EDT 2017


I am having issues in creating a repeating timer with
vtkOpenVRRenderWindowInteractor..
I definied a vtkTimerCallback class just like how timer is used in normal
vtkRenderWindowInteractor Then, // assuming iren is the interactor pointer
  vtkNew<vtkOpenVRRenderWindowInteractor> iren;
  iren->Initialize();
// Sign up to receive TimerEvent
  vtkSmartPointer<vtkTimerCallback2> cb =
vtkSmartPointer<vtkTimerCallback2>::New();
  iren->AddObserver(vtkCommand::TimerEvent, cb);
  iren->CreateRepeatingTimer(1000);
  iren->Start();

It seems after start() is called the timer is blocked. Does anyone have any
clue how to run a timer in vtkOpenVR module ? Or anyway of doing animation
in vtkOpenVR module?

Thanks !




--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Dev-f1251487.html


More information about the vtk-developers mailing list