[vtk-developers] Strange behavoir in vtkCamera
Lisa Avila
lisa.avila at kitware.com
Tue Mar 25 13:06:34 EST 2003
Hello Silvano,
Changing vtkCamera::ComputePerspectiveTransform would change more than just
the reset camera functionality - it would change the notion of how the view
angle is measured. Of course, looking at the code I now see that there is a
UseHorizontalViewAngle flag (default 0) that can be used to consider the
view angle in the x rather than the y direction. You could then write your
own reset functionality that switched this variable based on whether the
width or the height of the window was greater.
One other note - it looks like Chris Volpe made the change to add the
horizontal option - but it does not seem to be propagated to the parallel
case (just in perspective). I suspect this is a bug and I will correct it.
I am suspicious of this change - there are places outside of vtkCamera that
assume that the field of view defines the angle in Y and unless all of
these were changed as well then it is likely that using the horizontal flag
will result in bad images.
Lisa
At 12:48 PM 3/25/2003, Silvano Imboden wrote:
>Lisa Avila wrote:
>
>>Hello Silvano,
>>This is actually the expected behavior of vtkCamera - the field of view
>>is defined as view frustum angle in the Y direction and is therefore
>>solely dependent on the height of the window.
>>Lisa
>
>First I'll thank you for your real-time-feedback.
>
>I think that it is a common aspectation
>that ResetCamera bring everything in view
>whatever is the aspect-ratio
>of the RenderWindow.
>So in my modest opinion this behavoir is wrong.
>
>Anyway
>
>- Do you think that change implementation of
> vtkCamera::ComputePerspectiveTransform
> like I show in my previous mail
> may have some bad side-effect ?
>
>- can you make vtkCamera::ComputePerspectiveTransform
> virtual ?
>
>Many thanks -- Silvano
>======================
>s.imboden at cineca.it
>======================
>
>_______________________________________________
>vtk-developers mailing list
>vtk-developers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/vtk-developers
More information about the vtk-developers
mailing list