[vtkusers] Please help me to reset the camera. (reset the rotation)

Cory Quammen cquammen at cs.unc.edu
Sun Nov 9 10:19:21 EST 2008


If you want to reset your camera to an initial state (or view, however you
want to look at it), why not just save the camera state and restore it when
you reset the camera? You can use vtkCamera.GetPosition(), GetFocalPoint(),
and GetViewUp() to get the basic camera state and there are corresponding
methods SetPosition(), SetFocalPoint(), and SetViewUp() that you can use to
restore the camera state.

Hope that helps,
Cory

On Sun, Nov 9, 2008 at 8:57 AM, Shady Shidfar <shady_shidfar at yahoo.com>wrote:

> Dear all VTK users,
> I have a problem and I have emailed the forum several times but rarely got
> any reply. I'm really stuck with it. I simply need to reset the camera. I
> use the vtkRenderer.ResetCamera().
> The problem is the actors if zoomed, are restored to there initial
> situation but the rotation of the actor won't be reset. Please can someone
> help me with this. you can simply try the example in
> Examples\Rendering\TclCylinder.tcl. I guess pressing "r" does the
> ResetCamera action. If you rotate the object and press "r", it won't be
> restored to it's initial position. can please someone help
> me with this issue.
>
> Thanks
> Shaadi
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Cory Quammen
Center for Computer Integrated Systems for Microscopy and Manipulation
(CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill
http://www.cs.unc.edu/~cquammen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081109/34794a7f/attachment.htm>


More information about the vtkusers mailing list