[vtkusers] Multiple repeating timers associated with an interactor

Remi Charrier remi.charrier at gmail.com
Fri Aug 12 03:57:26 EDT 2016


Dear VTK community,¨

I am trying to create 2 different repeating timers (one every 105 ms and
the other one every 202 ms for example) and associate them with a
vtkinteractor.

I have no problem to do it for each one of them but I cannot add them
simultaneously without having them sharing the same timerdelay...

I am currently using the following code:
minteractor->AddObserver(vtkCommand::TimerEvent,  GetTimer1Object());
m_Timer1Id = minteractor->CreateRepeatingTimer(GetTimer1StepValue());

minteractor->AddObserver(vtkCommand::TimerEvent,  GetTimer2Object());
m_Timer2Id = minteractor->CreateRepeatingTimer(GetTimer2StepValue());


Is there a way to associate the observers to their timer id? So that they
do not share the same repeating timer?

Thanks in advance,
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160812/58cd2ef8/attachment.html>


More information about the vtkusers mailing list