[vtkusers] Rotate the camera
tao sun
colddiesun at gmail.com
Tue Dec 3 04:24:44 EST 2013
Hi Max,
This seems a good way with changing step by step.
I changed the camera and focal point position. It worked well for me.
Sun Tao
2013/12/2 Max <smapersmaper at gmail.com>
> Hi Sun Tao,
> Elevation is a tricky one, since after you rotate by more than 90 degrees,
> it gets a problem with view up vector and changes the axes, and you get
> something not intended.
> I solved it by:
> private void ElevateCamera(double angle)
> {
> //5 is chosen since 360 / 5 < 90 and there is a problem with
> angles bigger than 90
> double elevationPartialShift = angle / 5;
> for (int i = 0; i < 5; ++i)
> {
>
> WindowRenderer.GetActiveCamera().Elevation(elevationPartialShift);
> WindowRenderer.GetActiveCamera().OrthogonalizeViewUp();
> }
> }
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Rotate-the-camera-tp5724608p5724773.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131203/cf42aed2/attachment.htm>
More information about the vtkusers
mailing list