<div dir="ltr">Yes the fix will be for both Elevation and Pitch and i think it makes sense for the ViewUp to be modified, but you are wright to raise the <span style="font-size:12.8px">backwards compatibility issue...</span><div><span style="font-size:12.8px"><br></span><div><span style="font-size:12.8px">I could set the computed ViewUp before the call to SetPosition and set back the old one after, that would fix the main problem and keep </span><span style="font-size:12.8px">backwards compatibility. I can be ok with that but it feels odd to me...</span></div></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">If no one comes with a better solution in a couple of days will push that one.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">For the warning in </span><span style="font-size:12.8px">vtkPerspectiveTransform::</span><span style="font-size:12.8px">SetupCamera i have second thoughts, as VTK in general does not check stuff like that and let the responsibility to the caller. What do you think?</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-04 23:39 GMT+01:00 David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.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">Hi Xabi,<div><br></div><div>I think it's a good fix, note that the Pitch() method probably has the same issue.</div><div><br></div><div>It will break backwards compatibility, however, because currently the Elevation()</div><div>method leaves the ViewUp unchanged.  So any code that calls Elevation() and</div><div>then calls Azimuth() will give a different result after your fix.</div><div><br></div><div>Does anyone know why the Elevation() and Pitch() methods leave the ViewUp</div><div>unchanged?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div> - David</div></font></span><div><div class="h5"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 4, 2016 at 6:54 AM, Xabi Riobe <span dir="ltr"><<a href="mailto:xabivtk@gmail.com" target="_blank">xabivtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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></blockquote></div></div></div></div></div></div>
</blockquote></div><br></div>