[vtkusers] reset camera

André Prins a.h.prins at gmail.com
Fri May 7 06:17:59 EDT 2010


Hi Rodrigo,

Unfortunately the ResetCamera() resets the viewdirection (using
SetPosition() and SetFocalPoint()) but not the viewup vector.
To reset the orientation as well, reset it before reseting the camera: E.g.

    renderer->SetViewUp( 0, 1, 0 ); // assuming this is your initial
viewup-vector
    renderer->ResetCamer( );

Regards,
André

On Fri, May 7, 2010 at 10:20 AM, Rodrigo Valiña Gutiérrez
<rodrigo.valina at usc.es> wrote:
> Hi,
>
> I want to reset the camera, and I am using:
>
> renderer.ResetCamera().
>
> That resets the position and size, but not the rotation of the object.
> I wanted to place it in the default orientation (like initial
> orientation), but I don't find any method that works.
>
> I can not use the saved position of the camera because in my scene,
> the number of objects may have changed, and thus the center and size.
>
> Is there any form of reseting the camera rotation which works for any
> scene configuration ?
>
> --
> Rodrigo
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list