[vtkusers] 3D axis that follows main actor: Python / wxWindows / VTK

Amy Henderson amy.henderson at kitware.com
Thu Feb 5 15:01:32 EST 2004


Hi Uwe,

The reason for changing the ordering of the layer numbers is that in 
previous versions of VTK the ordering seemed exactly backwards.  In the CVS 
version of VTK, layer 0 is now the opaque layer, and successively higher 
layer numbers are transparent layers on top of it.  The ordering of the 
layer numbers is the order in which the renderers should be rendered (back 
to front).  This is also a particularly helpful ordering if your 
application is adding layers to the render window because only the new 
transparent renderers need to be renumbered.  (In the previous version, to 
add a transparent renderer over all the current renderers, every renderer 
in the render window had to be renumbered.)

- Amy

At 07:49 PM 2/5/2004 +0100, Uwe Rempler wrote:
>ups - just realized that with VTK v4.5.0 (CVS 22.01.04) this code isn't 
>quite working like in VTK v4.2.4...
>don't know why but for some circumstances the layernumbers of the 
>renderers have to be changed depending on VTK version - think you just 
>have to try it for yourself...
>
>VTK v4.2.4:
>-----------
>self.renwin.AddRenderer(self.axisRenderer)
>self.renwin.SetNumberOfLayers(2)
>self.main.ren.SetLayer(1)           # <--
>self.axisRenderer.SetLayer(0)       # <--
>
>VTK v4.5.0:
>-----------
>self.renwin.AddRenderer(self.axisRenderer)
>self.renwin.SetNumberOfLayers(2)
>self.main.ren.SetLayer(0)           # <--
>self.axisRenderer.SetLayer(1)       # <--
>
>maybe someone else knows the reason...
>
>greetings
>uwe
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic. 
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list