[vtkusers] Multithreading and VTK
Nigel Nunn
nNunn at ausport.gov.au
Thu Sep 11 17:47:39 EDT 2003
Hi Ben,
We get a worker thread, which runs the simulation, to build
Vtk data objects like vtkPoints (geometry), vtkDoubleArray
(scalars), and vtkUnstructuredGrid (topology). When a set
of results is ready, lock a "Results" object, copy the new
results into the "Results" object, then unlock the "Results".
The sim then calcs the next set of results, while the GUI
thread updates the Vtk pipeline with a few Modified()'s.
Nigel
> Thank you for the guidance! Then I gather that in order to pull
> this off as I described, then I would have to derive at least
> two threadsafe classes: one for the RenderWindowInteractor
> class, and one for the simulation. These represent the two
> ends of the pipeline.
>
> If it's not too much of an imposition--what would you do
> in my situation? Perhaps you have a better idea. Is there a
> built-in framework within vtk that I have overlooked, that
> better handles this problem?
>
> Because I seek event-driven user control of the camera, and
> independent updates to the data by a simulation, I can't see
> any way around the threading issue. Perhaps another process
> could derive the simulation data, but still that data would
> have received and processed by end application. That end
> application would still have to coordinate data updates
> with events (update requests) received by the UI.
>
> Thanks,
> Ben Harris
**********************************************************************
Registrations for the Coaching and Officiating - Investing in the future
conference close Friday 24 October. Don't miss out! After this date a
late fee will be applied. The conference is designed for those people
involved in coaching and officiating. It will assist sports in improving,
recruiting and retaining coaches and officials in all sports at all
levels. The conference will be held at the Australian Institute of Sport,
November 27-29 2003. For more information on the conference please visit
http://www.ausport.gov.au/events/coachofficial03 or contact (07) 3858 5418.
**********************************************************************
This message is intended for the addressee named and may contain
confidential and privileged information. If you are not the intended
recipient please note that any form of distribution, copying or use of
this communication or the information in it is strictly prohibited and
may be unlawful. If you receive this message in error, please delete it
and notify the sender.
Keep up to date with what's happening in Australian sport.
Visit http://www.ausport.gov.au
**********************************************************************
More information about the vtkusers
mailing list