[vtkusers] Pointer tracking - Observer/Command vs Win32 Msg cycle.

Sergio Aguirre sergio.aguirre at gmail.com
Sun Mar 13 21:54:08 EDT 2011


Hi everyone.



I am attempting to set up a Pointer tracking app to interactively manipulate
some vtk actors in a single scene – ie vtkRenderWindow.



Basically, I now have a simple OpenGL app where, in the Win32 message loop
after translate & dispatch, I go and get the position of my tracked pointer
and render the scene, unless I press the ESC key where I quit the app.



This way basically I have 3D objects continuously rendered and the tracked
tool is continuously interrogated and its corresponding 3D object is updated
in the scene.



However, in terms of VTK I am unsure how to implement this, since a
vtkRenderWindowInteractor will be observing/executing on mouse, key & other
events.



Then I explored on using a vtkWidget (ie vtkLineWidget2) where I could do a
callback function, but 1) its only binded to RenderWindowInteractor events
and mouse events.



Finally, looking at the vtkCommand IDs I could not find something that I
could observe if its not connected either to an interactor or filter after
calling update.



Can anyone recommend a reasonable approach to implement this? I first
thought of creating my own msg loop that would also listen to vtkCommand IDs
– but this seems to be what happens in
vtkWin32RenderWindowInteractor::Start()



Any help, suggestion or reference is appreciated



Sergio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110313/542b22b6/attachment.htm>


More information about the vtkusers mailing list