[vtkusers] Multiple rendering layers reacting to interaction
Oliver Kania
ptw.freiburg at googlemail.com
Tue Apr 8 08:12:32 EDT 2008
Hello,
my application has several layers :
vtkRenderer RenderImage2 = new vtkRenderer();
vtkRenderer RenderImage = new vtkRenderer();
RenderImage.SetLayer(0);
RenderImage2.SetLayer(1);
RenderImage.SetInteractive(1);
RenderImage2.SetInteractive(1);
RenderImage.SetBackground(0.0, 0.0, 0.3);
vtkRenderWindow renWin = new vtkRenderWindow();
renWin.SetNumberOfLayers(2);
renWin.AddRenderer(RenderImage2);
renWin.AddRenderer(RenderImage);
vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();
iren.SetRenderWindow(renWin);
//set image mode interaction style
vtkInteractorStyleImage interactor = new vtkInteractorStyleImage();
ren.SetInteractorStyle(interactor);
What I find is that only one layer reacts to interaction.
Since I used SetInteractive(), I was expecting that both layers do react.
More generally, I want to have an arbitrary number of layers that do
react to the same interaction. Maybe it is somehow possible to link
the cameras of the renderers ?
(I tried Renderer1.setCamera(Renderer2.getCamera()) but that does
not work)
kind regards,
Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080408/51a4f621/attachment.htm>
More information about the vtkusers
mailing list