"// Initialize must be called prior to creating timer events."<br><br>This comment and "example / test" code for interactor timers can be found in:<br>VTK/Rendering/Testing/Cxx/TestInteractorTimers.cxx<br>
<br>Also, you should use CreateRepeatingTimer or CreateOneShotTimer which are newer APIs that replace the old single timer implementation accessed via CreateTimer...<br><br><br>HTH,<br>David<br><br><br><div><span class="gmail_quote">On 2/8/08, <b class="gmail_sendername">Wesley Smith</b> <<a href="mailto:wesley.hoke@gmail.com">wesley.hoke@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br> I'm trying to figure out how to get the callback from a timer on a<br> vtkRenderWindowInteractor. I'm adding the interactor to the window<br> with SetRenderWindow, and then calling:<br> <br> win->m_iren->CreateTimer(VTKI_TIMER_FIRST);<br>
<br> This is on Windows by the way. Then, I do<br> <br> class myCommand : public vtkCommand<br> {<br> public:<br> static myCommand *New()<br> { return new myCommand; }<br>
<br> virtual void Execute(vtkObject *caller, unsigned long, void* CBdata)<br> {<br> printf("Timer\n");<br> }<br> };<br> <br> myCommand *cmd = myCommand::New();<br>
win->m_iren->AddObserver(vtkCommand::TimerEvent, cmd);<br> <br> And finally start everything up. The problem is I'm not getting any<br> any callbacks. Clearly since this isn't working I'm not understanding<br>
how to do this. What is the canonical method for betting a timer<br> callback here? Google and the VTK docs haven't turned anything up.<br> <br> thanks,<br> wes<br> _______________________________________________<br>
This is the private VTK discussion list.<br> Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br> Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br> </blockquote></div><br>