Skip to content Skip to sidebar Skip to footer

How To Pause And Restart An Animation In Vtk

I am trying to do an animation program in VTK, in which I could make the VTK objects animate but I failed to do pausing animation and restart animation, I came to know recently to

Solution 1:

If you start the vtkTimer like that:

vtkSmartPointer<vtkTimerCallback> cb = 
vtkSmartPointer<vtkTimerCallback>::New();
interactor->AddObserver(vtkCommand::TimerEvent, cb);

you may consider to stop/pause the timer with

vtkCommand::EndInteraction

i.e.

interactor->InvokeEvent(vtkCommand::TimerEvent, cb);

[It is just a moment thought, you can try it] ... :)

Post a Comment for "How To Pause And Restart An Animation In Vtk"