<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Jerome,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thank you so much! It works perfectly for my case.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-Jinzhong<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Jérôme
[mailto:jerome.velut@gmail.com] <br>
<b>Sent:</b> Monday, October 19, 2009 7:38 AM<br>
<b>To:</b> Yang, Jinzhong<br>
<b>Cc:</b> VTK users group<br>
<b>Subject:</b> Re: [vtkusers] Interaction Simultaneous for multiple renderers
in one render window<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>Hi,<br>
did you try to set the camera of one renderer to the other renderer?<br>
someting like this:<br>
renderer2-&gt;SetActiveCamera( renderer1-&gt;GetActiveCamera() );<br>
<br>
This will do the trick if you use a camera-style interactor.<br>
<br>
Hope that helps,<br>
Jerome<o:p></o:p></p>

<div>

<p class=MsoNormal>2009/10/18 Yang, Jinzhong &lt;<a
href="mailto:jinzhong76@gmail.com">jinzhong76@gmail.com</a>&gt;<o:p></o:p></p>

<p class=MsoNormal>Can anybody help me on this?<br>
Thanks.<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal><br>
-----Original Message-----<br>
From: Yang, Jinzhong [mailto:<a href="mailto:jinzhong76@gmail.com">jinzhong76@gmail.com</a>]<br>
Sent: Friday, October 16, 2009 3:59 PM<br>
To: 'VTK users group'<br>
Subject: Interaction Simultaneous for multiple renderers in one render<br>
window<br>
<br>
Hi All,<br>
<br>
I have a question on the interaction on the rendered window. Here is a<br>
snippet of my code:<br>
<br>
&nbsp;vtkRenderer* renderer1 = vtkRenderer::New();<br>
&nbsp;vtkRenderer* renderer2 = vtkRenderer::New();<br>
<br>
&nbsp;vtkRenderWindow* renWin = vtkRenderWindow::New();<br>
<br>
&nbsp;renWin-&gt;AddRenderer(renderer1);<br>
&nbsp;renWin-&gt;AddRenderer(renderer2);<br>
<br>
&nbsp;renderer1-&gt;SetViewport(0.0, 0.0, 0.5, 1.0);<br>
&nbsp;renderer2-&gt;SetViewport(0.5, 0.0, 1.0, 1.0);<br>
<br>
&nbsp;vtkRenderWindowInteractor* inter = vtkRenderWindowInteractor::New();<br>
&nbsp;inter-&gt;SetRenderWindow(renWin);<br>
<br>
&nbsp;... (Add mapping data to renderer1 and renderer2)<br>
<br>
&nbsp;// add axes<br>
&nbsp;vtkAxesActor* axes = vtkAxesActor::New();<br>
&nbsp;vtkPropAssembly* assembly = vtkPropAssembly::New();<br>
&nbsp;assembly-&gt;AddPart(axes);<br>
<br>
&nbsp;vtkOrientationMarkerWidget* widget1 = vtkOrientationMarkerWidget::New();<br>
&nbsp;widget1-&gt;SetOrientationMarker( assembly );<br>
&nbsp;widget1-&gt;SetInteractor(inter);<br>
&nbsp;widget1-&gt;SetViewport( 0.0, 0.0, 0.2, 0.2 );<br>
&nbsp;widget1-&gt;SetEnabled(1);<br>
&nbsp;widget1-&gt;InteractiveOff();<br>
<br>
&nbsp;renWin-&gt;Render();<br>
&nbsp;inter-&gt;Start();<br>
<br>
With this code, the object interactions in renderer1 and renderer2 are not<br>
correlated. Here, I would like the interactor (inter) acts simultaneously<br>
for objects in renderer1 and renderer2. For example, when I rotate or zoom<br>
in/out the object in renderer1, the object in renderer2 should change the<br>
same way as object in renderer1 does. Further, with this code, the axis<br>
orientation will change along the object orientation in renderer1, but not<br>
the one in renderer2. However, if I switch the Viewports of renderer1 and<br>
renderer2, the axis orientation will change along the object orientation in<br>
renderer2, but not the one in renderer1. Can anyone give me some hints to<br>
resolve this problem?<br>
<br>
Thank you!<br>
-Jinzhong<br>
<br>
<br>
<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><o:p></o:p></p>

</div>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>