<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Here's the code that I wrote to reset the actor positions to their
    defaults after being modified by the
    vtkInteractorStyleTrackballActor class.<br>
    It works, but does anybody know if this is the correct way to do it?
    Thanks!<br>
    <title>Snippet</title>
    <title>Snippet</title>
    <pre style="font-family:Consolas;font-size:13;color:black;background:white;">&nbsp;&nbsp;&nbsp;<span style="color:blue;">vtkActorCollection</span>&nbsp;*<span style="color:navy;">actors</span>=&nbsp;<span style="color:navy;">CurrentRenderer</span>-&gt;<span style="color:#880000;">GetActors</span>();
&nbsp;&nbsp;&nbsp;<span style="color:blue;">vtkCollectionSimpleIterator</span>&nbsp;<span style="color:navy;">cookie</span>;
&nbsp;&nbsp;&nbsp;<span style="color:blue;">vtkActor</span>&nbsp;*<span style="color:navy;">actor</span>;

&nbsp;&nbsp;&nbsp;<span style="color:navy;">actors</span>-&gt;<span style="color:#880000;">InitTraversal</span>(<span style="color:navy;">cookie</span>);
&nbsp;&nbsp;&nbsp;<span style="color:blue;">while</span>&nbsp;((<span style="color:navy;">actor</span>=&nbsp;<span style="color:navy;">actors</span>-&gt;<span style="color:#880000;">GetNextActor</span>(<span style="color:navy;">cookie</span>))&nbsp;!=&nbsp;<span style="color:#a000a0;">NULL</span>)
&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:blue;">if</span>&nbsp;(<span style="color:navy;">actor</span>-&gt;<span style="color:#880000;">GetUserMatrix</span>()&nbsp;!=&nbsp;<span style="color:#a000a0;">NULL</span>)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:navy;">actor</span>-&gt;<span style="color:#880000;">GetUserMatrix</span>()-&gt;<span style="color:#880000;">Identity</span>();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:navy;">actor</span>-&gt;<span style="color:#880000;">GetMatrix</span>()-&gt;<span style="color:#880000;">Identity</span>();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:navy;">actor</span>-&gt;<span style="color:#880000;">SetOrientation</span>(0,&nbsp;0,&nbsp;0);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:navy;">actor</span>-&gt;<span style="color:#880000;">SetScale</span>(1,&nbsp;1,&nbsp;1);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:navy;">actor</span>-&gt;<span style="color:#880000;">SetPosition</span>(0,&nbsp;0,&nbsp;0);
&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;<span style="color:blue;">if</span>&nbsp;(<span style="color:navy;">AutoAdjustCameraClippingRange</span>)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:navy;">CurrentRenderer</span>-&gt;<span style="color:#880000;">ResetCameraClippingRange</span>();

&nbsp;&nbsp;&nbsp;<span style="color:navy;">Interactor</span>-&gt;<span style="color:blue;">Render</span>();

</pre>
    <div class="moz-signature">-- <br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <title>Signature</title>
      <a href="http:://www.infolytica.com">www.infolytica.com </a><br>
      300 Leo Pariseau, Suite 2222, Montreal, QC, Canada, H2X 4B3<br>
      (514) 849-8752 x236, Fax: (514) 849-4239
    </div>
  </body>
</html>