[vtkusers] Multithreading and VTK

Dubois, John R (MED) John.Dubois at med.ge.com
Thu Sep 11 12:06:12 EDT 2003


If you are using Windows, you can hook into the WIndProc, or the message
dispatching system in MFC. The window will synchronize the interactor
events on message boundaries.

Thus, you can run other calculations on another thread. Since rendering
is also synchronized on a message boundary (WM_PAINT) you should be OK.

-----Original Message-----
From: Ben Harris [mailto:pben at arlut.utexas.edu]
Sent: Thursday, September 11, 2003 10:38 AM
To: vtkusers at vtk.org
Subject: [vtkusers] Multithreading and VTK


Hello all,

After referring to the books, and online documentation, and searching 
the vtkusers list, I am still stumped.

Is it possible for a RenderWindowInteractor to process events and 
control the camera on one thread, while on another thread a simulation 
is running? At the heart of this question, I believe, is the level of 
thread-safety associated with the visualization pipeline.

Here is my application: I am writing an N-body simulation--a numerical 
simulation of celestial bodies which move due to gravitational 
interaction. I would like to run the simulation while allowing the user 
to pan and zoom the camera.

Thanks in advance,
Ben Harris

-- 
R. BENJAMIN HARRIS                Space & Geophysics Laboratory
pben at arlut.utexas.edu             Applied Research Laboratories
(512) 835-3116                    The University of Texas at Austin
Fax: (512) 835-3544               http://www.arlut.utexas.edu/


_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list