Try making the static camera watch modified events from the dynamic one and when the callback happens set the transform of the watcher to that of the watched.<div><br clear="all">David E DeMarle<br>Kitware, Inc.<br>R&amp;D Engineer<br>

21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br>
<br><br><div class="gmail_quote">On Tue, Dec 27, 2011 at 11:46 PM, zlf <span dir="ltr">&lt;<a href="mailto:jxdw_zlf@yahoo.com.cn">jxdw_zlf@yahoo.com.cn</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi all,<br>
<br>
There are two sphere actors in my scene. I tried to set a sphere topmost.<br>
But when I move the camera by mouse, only renderer1&#39;s camera is changed,<br>
renderer2&#39;s camera is kept unchanged.<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vtkRenderWindow renwin = new vtkRenderWindow();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renwin.SetParentId(this.Handle);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renwin.SetSize(this.Width, this.Height);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vtkRenderer renderer1 = new vtkRenderer();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renderer1.SetLayer(1);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vtkRenderer renderer2 = new vtkRenderer();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renderer2.SetLayer(0);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renwin.AddRenderer(renderer1);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renwin.AddRenderer(renderer2);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renwin.SetNumberOfLayers(2);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vtkRenderWindowInteractor iren = new<br>
vtkRenderWindowInteractor();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iren.SetRenderWindow(renwin);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;vtkInteractorStyleTrackballCamera style = new<br>
vtkInteractorStyleTrackballCamera();<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iren.SetInteractorStyle(style);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Create a sphere actor and add it to renderer1<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Create another sphere actor and add it to renderer2<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;renwin.Render();<br>
<br>
Thanks<br>
<br>
superZZ<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Set-actor-topmost-tp5104451p5104451.html" target="_blank">http://vtk.1045678.n5.nabble.com/Set-actor-topmost-tp5104451p5104451.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</font></blockquote></div><br></div>