[vtkusers] vtkCamera : do YOU need SetDirectionOfProjection() ?

Sebastien BARRE seb-ml-vtk at barre.nom.fr
Mon Jul 17 04:33:43 EDT 2000


Two months ago, David Gobbi summarized the changes he made to the vtkCamera 
class :

At 15:35 01/05/00 -0400, David wrote :

>I've made some changes to vtkCamera that will impact
>backwards-compatibility.  The changes will be added to CVS
>tonight, and will appear in the nightly builds on Thursday.

[...]

>Item 2:  SetDirectionOfProjection(), GetDirectionOfProjection()
>
>These are new methods.  The DirectionOfProjection is the vector
>from the camera to the focal point, normalized to a length of 1.
>Unlike the old SetViewPlaneNormal method, the SetDirectionOfProjection
>will move the focal point to match the new direction of projection.

As I asked him today why he removed the SetDirectionOfProjection() function 
from the CVS, he stated that it was likely that it could be misuse 50% of 
the time, as the DOP could either be set from the focal point or from the 
position of the camera.

The only way the DOP might be set now is by changing the position of the 
camera, or the focal point (both in world coords).

David and I are both wondering if it's better to remove 
SetDirectionOfProjection() than having two 
SetDirectionOfProjectionFromPosition() and 
SetDirectionOfProjectionToFocalPoint() functions ?

Sometimes one want to keep the camera at the same position, but have it 
look around : hence, SetDirectionOfProjectFromPosition would change the 
focal point position. Sometimes one want the camera to look at the very 
same location (focal point) while remaining at the same distance, but move 
around the focal point (for example, change from a left view to a front 
view to a top/bottom view, etc) : thus, 
SetDirectionOfProjectionToFocalPoint() would change the position of the 
camera relative to the focal point.

Is there anyone here interested in having both functions be added to 
vtkCamera ?

Thanks







More information about the vtkusers mailing list