[vtkusers] Set actor topmost
    zlf 
    jxdw_zlf at yahoo.com.cn
       
    Tue Dec 27 23:46:02 EST 2011
    
    
  
Hi all,
There are two sphere actors in my scene. I tried to set a sphere topmost.
But when I move the camera by mouse, only renderer1's camera is changed,
renderer2's camera is kept unchanged.
            vtkRenderWindow renwin = new vtkRenderWindow();
            renwin.SetParentId(this.Handle);
            renwin.SetSize(this.Width, this.Height);
            vtkRenderer renderer1 = new vtkRenderer();
            renderer1.SetLayer(1);
            vtkRenderer renderer2 = new vtkRenderer();
            renderer2.SetLayer(0);
            renwin.AddRenderer(renderer1);
            renwin.AddRenderer(renderer2);
            renwin.SetNumberOfLayers(2);
            vtkRenderWindowInteractor iren = new
vtkRenderWindowInteractor();
            iren.SetRenderWindow(renwin);
            vtkInteractorStyleTrackballCamera style = new
vtkInteractorStyleTrackballCamera();
            iren.SetInteractorStyle(style);
           // Create a sphere actor and add it to renderer1
           // Create another sphere actor and add it to renderer2
            renwin.Render();
Thanks
superZZ
--
View this message in context: http://vtk.1045678.n5.nabble.com/Set-actor-topmost-tp5104451p5104451.html
Sent from the VTK - Users mailing list archive at Nabble.com.
    
    
More information about the vtkusers
mailing list