[vtkusers] vtkRenderer::ResetCamera( double bounds[6] ) modification submit
Sebastien
sebastien.calvi at yahoo.com
Mon Feb 10 15:52:57 EST 2014
Hello VTK developpers,
I'm using the vtkInteractorStyleTerrain class and I'm having issues with
some view-up settings; I try to set my view as it was being seen from top
and when I do so I get a vtk warning message telling me that the view-up has
been reseted because of parallel normal... I totally understand the
phenomenon but I was reaching this limit by rotating my view to be exactly
situated at "NORTH pole"; then instead of rotating my camera of 90 degrees
I've tried with 89, 88, still same result, on what I've started to debug and
then I've found out that inside the implementation of vtkRenderer
(vtkRenderer.cxx line 1099
the code is as follow:
if(fabs(vtkMath::Dot(vup,vn))>0.999)
the problem is that this is not very accurate, something like:
if(1.0 - fabs(vtkMath::Dot(vup,vn))<DBL_EPSILON)
is much more appropriate because it really matches the position and not at
+/- 3 degrees or so.
I'm using VTK 5.10.1 but I'm assuming that it is the same for VTK 6.1.
Is it possible that someone does the fix?
If not, please let me know hoe I can fix this myself because I'm not sure
that I can just inherit vtkRenderer...
Thank you,
Sebastien.
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkRenderer-ResetCamera-double-bounds-6-modification-submit-tp5725847.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list