[vtkusers] layered renderers

Steve Chall stevec at renci.org
Thu Apr 10 13:29:42 EDT 2008


Oliver,

Yes, I hope we can be of assistance to each other.  Thank you.  Has Robert
Clements' response been of any help for your immediate problem?

 

-Steve

 

  _____  

From: Oliver Kania [mailto:ptw.freiburg at googlemail.com] 
Sent: Wednesday, April 09, 2008 10:59 AM
To: Steve Chall; vtkusers at vtk.org
Subject: Re: [vtkusers] layered renderers

 

Hello Steve,
I am glad someone else has the same problems to solve ;)
However, I fear you are right : The books do not contain any
documentation on this. I even searched the archives without success.
There is only one rudimentary CPP example.
Anyway, I will try to do the same as you are doing and
work myself through it. So maybe we can help each other out ?

Kind regards,
Oliver

2008/4/8, Steve Chall <stevec at renci.org>:


>Message: 18
>Date: Tue, 8 Apr 2008 14:12:32 +0200
>From: "Oliver Kania" <ptw.freiburg at googlemail.com>
>Subject: [vtkusers] Multiple rendering layers reacting to interaction
>To: vtkusers at vtk.org
>Message-ID:
>       <e22fb1100804080512q2b1ad655oee6f3581183bfb60 at mail.gmail.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>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

Thank you, Oliver, for bringing layered rendering to my attention.  This
sounds like it could resolve some visibility issues I'm experiencing.
However, I can't seem to find very much documentation on this feature.  I've
bought and looked through the books, read the code in vtkRenderer.h, and
checked online, and pretty much all I've found out is that layers are
numbered and all but the bottom are transparent.  I can and, if necessary,
will work through it empirically, i.e., by writing code and seeing what
happens.  But it would be valuable and probably much more efficient if there
were some more thorough documentation than what I've found thus far.  Can
anyone point me to it?  Admittedly, once again I may have just overlooked
something obvious, but if so I'd appreciate someone shaking me out of my
tunnel vision.  Thanks all.

-Steve


_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080410/5eac1608/attachment.htm>


More information about the vtkusers mailing list