[vtkusers] Re: timer example

Dominik Szczerba domi at vision.ee.ethz.ch
Thu Nov 9 16:10:49 EST 2006


After manual hacking on the CMakeLists it compiles and seems to do something. I am looking inside what it is supposed to do...
Thanks a lot
Dominik

Calling iren->Start()...
vtkTimerCallback::Report
  ReallyFastTimerId: 2
  ReallyFastTimerCount: 2051
  FastTimerId: 3
  FastTimerCount: 313
  RenderTimerId: 4
  RenderTimerCount: 82
  OneShotTimerId: 5
QuitOnOneShotTimer is true.
Calling iren->ExitCallback()...


On Thursday 09 November 2006 18:42, David Cole wrote:
> Also....
> 
> I just added VTK/Rendering/Testing/Cxx/TestInteractorTimers.cxx as a test of
> multiple simultaneously running timers. Please get it from CVS if you can
> and try it out.
> 
> Let me know if you encounter any problems with it.
> 
> HTH,
> David
> 
> 
> On 11/9/06, Goodwin Lawlor <goodwin.lawlor at ucd.ie> wrote:
> >
> > Dominik Szczerba wrote:
> > > According to the docu, the vtkHoverWidget is used to invoke an event
> > when
> > > hovering in a render window. Do you propose to use a zero threshold to
> > > simulate an idle function? That sounds like an overkill for what I need.
> > Iren
> > > allows for timers, is there really no way to regularly trigger arbitrary
> > > commands just like iren->AddObserver(vtkCommand::MouseMoveEvent,
> > myCommand)
> > > does on a mouse movement?
> >
> > Hi Dominik,
> >
> > I meant vtkHoverWidget is the only that uses a repeating timer at the
> > moment. Here a (slightly buggy) but quick tcl example to illustrate:
> >
> > package require vtk
> > wm withdraw .
> >
> > set val 10
> >
> > vtkTextActor txt
> >    txt SetInput $val
> >    txt SetMinimumSize 100 100
> >    txt ScaledTextOn
> >
> > vtkRenderer ren
> >    ren AddActor txt
> >
> > vtkRenderWindow renwin
> >    renwin AddRenderer ren
> >
> > vtkRenderWindowInteractor iren
> >    iren SetRenderWindow renwin
> >    iren Initialize
> >
> >    iren CreateRepeatingTimer 1000
> >    iren AddObserver TimerEvent {if {$val == 0} exit}
> >    iren AddObserver TimerEvent {txt SetInput [incr val -1]; txt
> > Modified; renwin Render}
> >
> > hth
> >
> > Goodwin
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> 

-- 
Dominik Szczerba, Ph.D.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061109/b39d939a/attachment.pgp>


More information about the vtkusers mailing list