<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [vtkusers] layered renderers</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>I may have figured this out. Try setting the interactorstyle on your render window with something similar to the following. If i comment out the last 3 lines only 1 of my layers interacts. See if that helps<BR>
<BR>
<BR>
set iact [[$renderWidget GetRenderWindow] GetInteractor]<BR>
set renWin2 [$renderWidget GetRenderWindow]<BR>
vtkInteractorStyleTrackballCamera style<BR>
$iact SetInteractorStyle style<BR>
$iact SetRenderWindow $renWin2<BR>
$iact SetDesiredUpdateRate 0<BR>
<BR>
<BR>
Rob<BR>
<BR>
<BR>
I tried precisely that. Without success.<BR>
Maybe there is some detail I overlooked.<BR>
DO you have any example-code ?<BR>
<BR>
Kind regards,<BR>
oliver<BR>
<BR>
2008/4/9, CLEMENTS, ROBERT <rclement@kent.edu>:<BR>
><BR>
> I to have had similar problems but it seems that using something similar<BR>
> to below;<BR>
><BR>
> ren4 SetActiveCamera [ren2 GetActiveCamera]<BR>
><BR>
> makes both layers react to the same input. Hope this helps .<BR>
><BR>
> Rob<BR>
><BR>
><BR>
> Hello Steve,<BR>
> I am glad someone else has the same problems to solve ;)<BR>
> However, I fear you are right : The books do not contain any<BR>
> documentation on this. I even searched the archives without success.<BR>
> There is only one rudimentary CPP example.<BR>
> Anyway, I will try to do the same as you are doing and<BR>
> work myself through it. So maybe we can help each other out ?<BR>
><BR>
> Kind regards,<BR>
> Oliver<BR>
><BR>
> 2008/4/8, Steve Chall <stevec@renci.org>:<BR>
> ><BR>
> ><BR>
> > >Message: 18<BR>
> > >Date: Tue, 8 Apr 2008 14:12:32 +0200<BR>
> > >From: "Oliver Kania" <ptw.freiburg@googlemail.com><BR>
> > >Subject: [vtkusers] Multiple rendering layers reacting to interaction<BR>
> > >To: vtkusers@vtk.org<BR>
> > >Message-ID:<BR>
> > > <e22fb1100804080512q2b1ad655oee6f3581183bfb60@mail.gmail.com><BR>
> > >Content-Type: text/plain; charset="iso-8859-1"<BR>
> > ><BR>
> > >Hello,<BR>
> > >my application has several layers :<BR>
> > ><BR>
> > >vtkRenderer RenderImage2 = new vtkRenderer();<BR>
> > >vtkRenderer RenderImage = new vtkRenderer();<BR>
> > ><BR>
> > > RenderImage.SetLayer(0);<BR>
> > > RenderImage2.SetLayer(1);<BR>
> > ><BR>
> > > RenderImage.SetInteractive(1);<BR>
> > > RenderImage2.SetInteractive(1);<BR>
> > ><BR>
> > ><BR>
> > > RenderImage.SetBackground(0.0, 0.0, 0.3);<BR>
> > ><BR>
> > > vtkRenderWindow renWin = new vtkRenderWindow();<BR>
> > > renWin.SetNumberOfLayers(2);<BR>
> > > renWin.AddRenderer(RenderImage2);<BR>
> > > renWin.AddRenderer(RenderImage);<BR>
> > ><BR>
> > >vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();<BR>
> > >iren.SetRenderWindow(renWin);<BR>
> > >//set image mode interaction style<BR>
> > >vtkInteractorStyleImage interactor = new vtkInteractorStyleImage();<BR>
> > >ren.SetInteractorStyle(interactor);<BR>
> > ><BR>
> > >What I find is that only one layer reacts to interaction.<BR>
> > >Since I used SetInteractive(), I was expecting that both layers do<BR>
> react.<BR>
> > >More generally, I want to have an arbitrary number of layers that do<BR>
> > >react to the same interaction. Maybe it is somehow possible to link<BR>
> > >the cameras of the renderers ?<BR>
> > >(I tried Renderer1.setCamera(Renderer2.getCamera()) but that does<BR>
> > >not work)<BR>
> > ><BR>
> > >kind regards,<BR>
> > >Oliver<BR>
> ><BR>
> > Thank you, Oliver, for bringing layered rendering to my attention. This<BR>
> > sounds like it could resolve some visibility issues I'm experiencing.<BR>
> > However, I can't seem to find very much documentation on this<BR>
> > feature. I've<BR>
> > bought and looked through the books, read the code in vtkRenderer.h, and<BR>
> > checked online, and pretty much all I've found out is that layers are<BR>
> > numbered and all but the bottom are transparent. I can and, if<BR>
> necessary,<BR>
> > will work through it empirically, i.e., by writing code and seeing what<BR>
> > happens. But it would be valuable and probably much more efficient if<BR>
> > there<BR>
> > were some more thorough documentation than what I've found thus far.<BR>
> Can<BR>
> > anyone point me to it? Admittedly, once again I may have just<BR>
> overlooked<BR>
> > something obvious, but if so I'd appreciate someone shaking me out of my<BR>
> > tunnel vision. Thanks all.<BR>
> ><BR>
> > -Steve<BR>
> ><BR>
> ><BR>
> > _______________________________________________<BR>
> > This is the private VTK discussion list.<BR>
> > Please keep messages on-topic. Check the FAQ at:<BR>
> > <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
> > Follow this link to subscribe/unsubscribe:<BR>
> > <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
> ><BR>
><BR>
><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>