<font size="2"><font face="verdana,sans-serif">vis is QVTK control. You need to do something maybe similar, but the main thing you have to calculate differently is eye position (move eye position with button clicks).<br><span style="font-family: courier new,monospace;">void MainWindow::defaultCameraPos()</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    VisualizingImageType::PointType p;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    unsigned xsize=logic-&gt;visualizing-&gt;GetLargestPossibleRegion().GetSize(0),</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">             ysize=logic-&gt;visualizing-&gt;GetLargestPossibleRegion().GetSize(1),</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">             zsize=logic-&gt;visualizing-&gt;GetLargestPossibleRegion().GetSize(2);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    VisualizingImageType::IndexType ind;</span><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    ind[0]=xsize/2; ind[2]=zsize/2;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    ind[1]=0;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    logic-&gt;visualizing-&gt;TransformIndexToPhysicalPoint(ind, p);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    vec3 top(p[0], p[1], p[2]);</span><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    ind[0]=xsize-1; ind[1]=ysize/2; ind[2]=zsize/2;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    logic-&gt;visualizing-&gt;TransformIndexToPhysicalPoint(ind, p);</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    vec3 right(p[0], p[1], p[2]);</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    ind[0]=xsize/2; ind[1]=ysize/2; ind[2]=zsize/2;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    logic-&gt;visualizing-&gt;TransformIndexToPhysicalPoint(ind, p);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    vec3 center(p[0], p[1], p[2]);</span><br style="font-family: courier new,monospace;">

<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    vec3 up(top-center), eye((right-center)^up); //view from left</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    vtkCamera *cam=vis-&gt;GetRenderWindow()-&gt;GetRenderers()-&gt;GetFirstRenderer()-&gt;GetActiveCamera();</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    cam-&gt;SetPosition(eye[0], eye[1], eye[2]);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    cam-&gt;SetViewUp(up[0], up[1], up[2]);</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">    vis-&gt;GetRenderWindow()-&gt;GetRenderers()-&gt;GetFirstRenderer()-&gt;ResetCamera();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br>

</font></font><br><div class="gmail_quote">On Sat, Nov 5, 2011 at 21:46, Claire.Fanny <span dir="ltr">&lt;<a href="mailto:Claire.Fanny1995@gmail.com">Claire.Fanny1995@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;">

Hi iam Claire well from subject of this email i know you all better<br>
understand what i need to do,<br>
what i want when i click on button so camera automatically move in clock<br>
wise direction and another button for anti clock wise so please guide me how<br>
can i achieve that bit.<br>
<br>
<br>
Regards<br>
<br>
Claire Francis<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Camera-movement-from-button-click-tp4967441p4967441.html" target="_blank">http://vtk.1045678.n5.nabble.com/Camera-movement-from-button-click-tp4967441p4967441.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>