Update point in real time

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Update point in real time

Hi everyone,

I'm very new to VTK. I've found it to be quite complicated but have been
familiarizing myself by playing with the tutorial examples (in C++).

The task I'm working on is to have a single point that changes positions in
real time. I have a simple VTK program that draws the initial point.

I have a separate C++ program that I wrote which continuously updates the
position I want the point to move to (x and y coordinates). These values are
obtained from a mouse sensor. I use an infinite while loop to continuously
get the values I need.

From what I've been able to see, the only way I can update the position of
the point after rendering is to use a callback function. I am using a timer
callback so I can repeatedly enter the function to update the point

My issue is that I am not sure how to link the two programs. How can I
initialize and render my point and at the same time also read coordinates
from the mouse sensor?

I would appreciate any help and can gladly offer more details if required.


Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe: