[vtk-developers] vtkCamera and 0.0002

Robert M. O'Bara obara at nycap.rr.com
Wed Feb 25 08:54:11 EST 2004


Hi Ken,


>> vtkCamera enforces the policy that the distance between the camera
>> position and the focal point always be >= 0.0002.  Besides the fact
>> that having them be the same would be a bad thing, is there any other
>> justification for this?  The problem I'm seeing is that my entire 
>> scene
>> might fit in a sphere of radius 0.0001 which would make dollying the
>> camera useless.
>
> There needs to be a limit but there is nothing magical about .0002, it 
> was
> probably something that has been in there since day 1. Having said 
> that,
> probably a safe limit would be more like 1e-10 (rough cube of a float) 
> as
> opposed to 2e-4. While VTK's calcs are in double I seem to remember 
> having
> some problems with some OpenGL variants not dealing well with camera
> operations in the 1e-15 range.
>
>> I was wondering if this should be something that the user could set
>> since he/she would know the scale of the scene being looked at.
>>
>> Also, when this limit is violated the behavior is to move the focal
>> point so the distance is 0.0002, perhaps a better thing to do is
>> nothing - don't change the camera at all and perhaps in debug mode put
>> out message stating that happened.
>
> Doing nothing would leave the camera in an inappropriate state. 
> Something
> must change. One point where this code is called is when the position 
> is
> set. If they set the position to the focal point then we should adjust 
> one
> of the two values to avoid FPEs or worse a video driver crash for 
> poorly
> written OpenGL drivers. You could argue that the Pos should change 
> instead
> of the FP but either way someone might be unhappy. I think the key for 
> your
> case is to have a more reasonable lower limit on the distance.
>
By "nothing" I mean that the requested modification (changing the 
position or focal point) is not done - maybe a status could be returned 
stating that the requested change could not be performed.
> Thanks
> Ken
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
Robert M. O'Bara, MEng.
Senior Software Engineer

Simmetrix Inc.
10 Halfmoon Executive Park Drive
Clifton Park, NY 12065

Phone (518) 348-1639 x-104




More information about the vtk-developers mailing list