Hi,<div><br></div><div>You need to work with the camera. Basically, there are three ivars you can work with in vtkCamera:</div><div><br></div><div>1. The FocalPoint - this controls the point the camera &quot;looks&quot; at.</div>
<div>2. The Position - this controls _where_ the camera is in space.</div><div>3. The ViewUp - this controls what the &quot;up&quot; direction is (i.e., the direction that goes bottom-to-top in the view).</div><div><br></div>
<div>The constraint is that ViewUp should be orthogonal to the direction from Position to FocalPoint (this is accessible through GetDirectionOfProjection).</div><div><br></div><div>There are convenience functions to set these too (like SetRoll, which rolls the camera around the DirectionOfProjection).</div>
<div><br></div><div>Normally, what I do is,</div><div>a) Move the FocalPoint to the center of my object, or wherever on the object I want to center my view</div><div>b) Move the Position to a point in the corresponding axis. For looking from positive X, I move the camera to something like (1, 0, 0).</div>
<div>c) Set the ViewUp to whatever should be the appropriate up vector for my scene - (0, 0, 1) for Z axis.</div><div>d) Call ResetCamera on the renderer to give me the full view. There&#39;s also an overload to ResetCamera that takes bounds, so that you can reset to view only a specific region.</div>
<div><br></div><div>You can either have multiple cameras and call SetActiveCamera on the renderer, or get the camera from the renderer, and manipulate it.</div><div><br></div><div>HTH</div><div>Shash</div><div><br><div class="gmail_quote">
On Mon, May 9, 2011 at 12:16 PM, Nelson <span dir="ltr">&lt;<a href="mailto:gnjoseph@gmail.com">gnjoseph@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">










<div lang="EN-US" link="blue" vlink="purple">

<div>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Hi David,</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Thanks for your help.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">As in the <u>Paraview</u>, I want to create different views of
an object. As you aware the following toolbar does this operation.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"><img width="177" height="37" alt="Capture.PNG"></span><span style="font-size:11.0pt;color:#1F497D"></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I am also keep trying to create such views of an object.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I am anticipating your reply.</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Regards,</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Nelson</span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </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">From:</span></b><span style="font-size:10.0pt"> David Doria
[mailto:<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>] <br>
<b>Sent:</b> Saturday, May 07, 2011 2:06 AM<br>
<b>To:</b> Nelson<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] How to view Front, Top, Bottom, etc views of an
object?</span></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"> </p>

<div>

<p class="MsoNormal">On Wed, Mar 16, 2011 at 1:18 AM, Nelson &lt;<a href="mailto:gnjoseph@gmail.com" target="_blank">gnjoseph@gmail.com</a>&gt; wrote:</p>

<p class="MsoNormal">Hi All, I am using <b>vtkLSDynaReader</b>. I am able to
render the d3plot file with <b>vtkInteractorStyleTrackballCamera.</b> I want to
view the Front, Back, Top, Bottom, Right, Left views of it. How to get those
views? Thanks in advance. </p>

<div>

<p class="MsoNormal">Best Regards, <br>
Nelson</p>

</div>

<div>

<p class="MsoNormal"> </p>

</div>

<div>

<p class="MsoNormal">Did you ever get it to work? Either way, we should make this
into an example. I think you&#39;d just need 6 viewports:</p>

</div>

</div>

<div>

<p class="MsoNormal"> </p>

</div>

<div>

<p class="MsoNormal"><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MultipleViewports" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MultipleViewports</a></p>

</div>

<div>

<p class="MsoNormal"> </p>

</div>

<div>

<p class="MsoNormal" style="margin-bottom:12.0pt">each with its camera positioned
appropriately. Maybe the above link will give you somewhere to start. If you&#39;re
still having problems, post your attempt under &quot;wish list&quot; on the
examples page and we&#39;ll take a look.</p>

<div>

<p class="MsoNormal">David </p>

</div>

</div>

</div></div></div>

</div>


<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>
<br></blockquote></div><br></div>