<div dir="ltr">Ok now it looks clear to me, thanks for the explanation Will.<div><br></div><div>So i'll just fix the 90° issue.<br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-05 12:54 GMT+01:00 Will Schroeder <span dir="ltr"><<a href="mailto:will.schroeder@kitware.com" target="_blank">will.schroeder@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is a known problem since 1993 when VTK was first written. It is presumed to be an application-level issue. That is, if you are flying over terrain, you do not want to be messing with the view up, otherwise the elevation, pitch, etc. lose their meaning. <div><br></div><div>As evidence of this check out VTK/Interaction/Style/vtkInteractionStyleTerrain which has explicit commentary about dealing with the north pole singularity. Then look at vtkInteractorStyleTrackballCamera, vtkInteractorStyleJoystickCamera, etc. They all have explicit calls to camera->OrthogonalizeViewUp() which is added to address the view up singularity.<div><br></div><div>Best,</div></div><div>W</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Feb 4, 2016 at 8:54 AM, Xabi Riobe <span dir="ltr"><<a href="mailto:xabivtk@gmail.com" target="_blank">xabivtk@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>There is an issue in vtkCamera::Elevation if the angle is 90.</div><div><br></div><div>It is 100% reproductible with VS2013 if compiled in 64bits, otherwise the rounding epsilon makes it work by chance.</div><div><br></div><div>I'm willing to fix it in GitLab but first i would like your opinion about the best way to do it.</div><div><br></div><div>with a simple example of a plane in a renderer, and a call to renderer->GetActiveCamera()->Elevation(90)</div><div><br></div><div>What happens in the call stack of vtkCamera::Elevation :</div><div>   vtkCamera::SetPosition()<br></div><div>   vtkCamera::ComputeViewTransform</div><div>   vtkPerspectiveTransform::SetupCamera</div><div><br></div><div>   vtkMath::Cross(viewUp,viewPlaneNormal,viewSideways);</div><div><br></div><div>where viewUp and viewPlaneNormal are both (0,1,0)  so viewSideways is (0,0,0) leading to bad camera parameters.</div><div>Here comes the VS13+64bits configuration case, when with others, viewSideways is luckily different than 0</div><div><br></div><div>What do you think of applying the rotation to the viewUp vector in vtkCamera::Elevation before the call to SetPosition?</div><div>Should we put a warning in vtkPerspectiveTransform::SetupCamera when vtkMath::Normalize returns 0?</div><div><br></div><div><br></div><div><br></div></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div>William J. Schroeder, PhD<br>Kitware, Inc. - Building the World's Technical Computing Software<br>28 Corporate Drive<br>Clifton Park, NY 12065<br><a href="mailto:will.schroeder@kitware.com" target="_blank">will.schroeder@kitware.com</a><br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br><a href="tel:%28518%29%20881-4902" value="+15188814902" target="_blank">(518) 881-4902</a></div></div></div>
</font></span></div>
</blockquote></div><br></div>