<!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 to have had similar problems but&nbsp; it seems that using something similar to below;<BR>
<BR>
ren4 SetActiveCamera [ren2 GetActiveCamera]<BR>
<BR>
makes both layers react to the same input.&nbsp; Hope this helps .<BR>
<BR>
Rob<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 &lt;stevec@renci.org&gt;:<BR>
&gt;<BR>
&gt;<BR>
&gt; &gt;Message: 18<BR>
&gt; &gt;Date: Tue, 8 Apr 2008 14:12:32 +0200<BR>
&gt; &gt;From: &quot;Oliver Kania&quot; &lt;ptw.freiburg@googlemail.com&gt;<BR>
&gt; &gt;Subject: [vtkusers] Multiple rendering layers reacting to interaction<BR>
&gt; &gt;To: vtkusers@vtk.org<BR>
&gt; &gt;Message-ID:<BR>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;e22fb1100804080512q2b1ad655oee6f3581183bfb60@mail.gmail.com&gt;<BR>
&gt; &gt;Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<BR>
&gt; &gt;<BR>
&gt; &gt;Hello,<BR>
&gt; &gt;my application has several layers :<BR>
&gt; &gt;<BR>
&gt; &gt;vtkRenderer RenderImage2 = new vtkRenderer();<BR>
&gt; &gt;vtkRenderer RenderImage = new vtkRenderer();<BR>
&gt; &gt;<BR>
&gt; &gt; RenderImage.SetLayer(0);<BR>
&gt; &gt; RenderImage2.SetLayer(1);<BR>
&gt; &gt;<BR>
&gt; &gt; RenderImage.SetInteractive(1);<BR>
&gt; &gt; RenderImage2.SetInteractive(1);<BR>
&gt; &gt;<BR>
&gt; &gt;<BR>
&gt; &gt;&nbsp; RenderImage.SetBackground(0.0, 0.0, 0.3);<BR>
&gt; &gt;<BR>
&gt; &gt;&nbsp; vtkRenderWindow renWin = new vtkRenderWindow();<BR>
&gt; &gt;&nbsp; renWin.SetNumberOfLayers(2);<BR>
&gt; &gt;&nbsp; renWin.AddRenderer(RenderImage2);<BR>
&gt; &gt;&nbsp; renWin.AddRenderer(RenderImage);<BR>
&gt; &gt;<BR>
&gt; &gt;vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();<BR>
&gt; &gt;iren.SetRenderWindow(renWin);<BR>
&gt; &gt;//set image mode interaction style<BR>
&gt; &gt;vtkInteractorStyleImage interactor = new vtkInteractorStyleImage();<BR>
&gt; &gt;ren.SetInteractorStyle(interactor);<BR>
&gt; &gt;<BR>
&gt; &gt;What I find is that only one layer reacts to interaction.<BR>
&gt; &gt;Since I used SetInteractive(), I was expecting that both layers do react.<BR>
&gt; &gt;More generally, I want to have an arbitrary number of layers that do<BR>
&gt; &gt;react to the same interaction. Maybe it is somehow possible to link<BR>
&gt; &gt;the cameras of the renderers ?<BR>
&gt; &gt;(I tried Renderer1.setCamera(Renderer2.getCamera()) but that does<BR>
&gt; &gt;not work)<BR>
&gt; &gt;<BR>
&gt; &gt;kind regards,<BR>
&gt; &gt;Oliver<BR>
&gt;<BR>
&gt; Thank you, Oliver, for bringing layered rendering to my attention.&nbsp; This<BR>
&gt; sounds like it could resolve some visibility issues I'm experiencing.<BR>
&gt; However, I can't seem to find very much documentation on this<BR>
&gt; feature.&nbsp; I've<BR>
&gt; bought and looked through the books, read the code in vtkRenderer.h, and<BR>
&gt; checked online, and pretty much all I've found out is that layers are<BR>
&gt; numbered and all but the bottom are transparent.&nbsp; I can and, if necessary,<BR>
&gt; will work through it empirically, i.e., by writing code and seeing what<BR>
&gt; happens.&nbsp; But it would be valuable and probably much more efficient if<BR>
&gt; there<BR>
&gt; were some more thorough documentation than what I've found thus far.&nbsp; Can<BR>
&gt; anyone point me to it?&nbsp; Admittedly, once again I may have just overlooked<BR>
&gt; something obvious, but if so I'd appreciate someone shaking me out of my<BR>
&gt; tunnel vision.&nbsp; Thanks all.<BR>
&gt;<BR>
&gt; -Steve<BR>
&gt;<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; This is the private VTK discussion list.<BR>
&gt; Please keep messages on-topic. Check the FAQ at:<BR>
&gt; <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
&gt;<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>