[vtkusers] What is the callback function of vtkCommand::StartEvent?
David E DeMarle
dave.demarle at kitware.com
Thu Apr 21 09:02:03 EDT 2011
On Thu, Apr 21, 2011 at 5:59 AM, wayne5ning <wayne5ning at gmail.com> wrote:
> When an vtkRenderWindow is about to Render, it invokes the event
> vtkCommand::StartEvent, but I cannot find how this event is handled.
>
> I've tried to find all the matches of vtkCommand::StartEvent in the source
> files, which are listed in the attached picture. Because the event handling
> is based on the observer pattern, so I'm interested in the AddObserver()
> function as highlighted in red boxes in the picture. Four
> AddObserver(vtkCommand::StartEvent,...) functions are found, e.g. in
> Cone2.cxx, TestTemporalCacheSimple.cxx, TestTemporalCacheTemporal.cxx,
> vtkParallelRenderManager.cxx. After excluding the example and testing files,
> we have vtkParallelRenderManager.cxx.
"git grep vtkCommand::StartEvent" picks up a few more classes that
watch renderwindow startevents (QVTKWIdget2, vtkPHardwareSelector) but
you have the right idea, grep the code and find out what, if anything,
reacts to any particular event from any particular class.
> I'm wondering whether the rendering runs in parallel mode. If not, then how
> does vtkCommand object handdle the vtkCommand::StartEvent in its Execute()
> method?
>
When you run in parallel (like ParaView can), the parallel render
manager watches render events from the renderwindow on the root
process so that it can tell the renderwindows in all satellite
processes to render too. That way everyone stays in synch and the
depth compositing algorithms (if employed) know when to do their work.
> http://vtk.1045678.n5.nabble.com/file/n4330409/vtkCommand_StartEvent_matches.png
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/What-is-the-callback-function-of-vtkCommand-StartEvent-tp4330409p4330409.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
More information about the vtkusers
mailing list