[vtk-developers] Multiple Renderers

Dean Inglis dean.inglis at on.aibn.com
Tue Apr 30 14:35:08 EDT 2002


Hi all,

Started this thread in vtkusers but would like to continue in
vtk-developers:


Heres is a possible pipeline: all Renderers (ren1, ren2 ...) in one
RenderWindow (renWin) with one Interactor (iren);
ren1: 3 ImagePlaneWidgets: widgX, widgY, widgZ in ren1
ren2: an Actor2D/ImageMapper pair to display the output from the widgX's
internal ImageReslice (GetResliceOutput not implemented yet)
ren3: as above but for widgY
ren4: as above but for widgZ

ren1 to ren4 are spatially arranged in renWin via SetViewport calls.

With most actor/mapper pairs, as in ren2 to ren4, the actor is added to the
renderer.  In the case of the widget, the widget is associated with the
interactor and not, in this case, the desired renderer ren1.  Currently, the
interactor does a FindPokedRenderer to determine the renderer and hence
which props are candidates for GUI interaction.  The problem with the widget
is that its actors are added to a renderer according to the 'global'
interactor.

 e.g., from vtkBoxWidget:
 this->CurrentRenderer =
      this->Interactor->FindPokedRenderer(this->Interactor->
GetLastEventPosition()[0],

this->Interactor->GetLastEventPosition()[1]);

Doesn't this lead to ambiguity?  It seems to since when I tried to do this I
couldn't build this pipeline correctly: the widgets kept appearing in the
last added renderer (with a smaller viewport) in the renderwindow's
collection.



More information about the vtk-developers mailing list