[vtkusers] Interaction stops Timer

"Mönch, Tobias" Tobias.Moench at Medizin.Uni-Magdeburg.DE
Wed Mar 8 03:07:37 EST 2006


Hi everybody,

 

I'm having problems using a timer and interaction but couldn't find a solution for my problem. 

During a simple rendering I use a timer to check the state of a variable that determines some properties. If this variable is updated the render window has to be updated too. Here is the code for the timer:

 

vtkCallbackCommand *cbc = vtkCallbackCommand::New();

    cbc->SetCallback(myEventHandler);

 

iren->AddObserver(vtkCommand::TimerEvent,cbc);       // RenderwindowInteractor

...

iren->CreateTimer(VTKI_TIMER_FIRST);

 

 

In my event handling function I call:

 

iren->CreateTimer(VTKI_TIMER_UPDATE);

 

to keep the timer running.

 

When I run this application everything works fine and is updated properly. But starting some simple interaction like rotating or scaling seems to stop the timer. So I have to click into the window and do some interaction to get the RenderWindow updated. As I noticed the timer-callback is called correctly during the interaction but does nothing after it.

 

Does anyone have an idea?

 

Thank you,

Tobias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060308/7ad0d1f8/attachment.htm>


More information about the vtkusers mailing list