Direction of Projection

David Gobbi dgobbi at irus.rri.on.ca
Wed May 3 12:26:50 EDT 2000


On Wed, 3 May 2000, Ken Martin wrote:

> At 07:21 AM 5/3/00 -0400, you wrote:
> >Folks,
> >         I talked to Jim Miller about the Direction of Projection in the 
> > camera. His first reaction
> >was" DOP is only used for parallel projections." Sure enough, I checked 
> >Foley and vanDam (pg 231, top
> >paragraph).
> >
> >Should we revisit this?
> 
> Again I don't have Foley vanDam here.  But I don't see how this changes 
> anything. We don't use DOP in perspective projections, we use VPN, but... 
> -DOP still is not the same as VPN. If you want to keep using VPN that is 
> fine, but it is not the vector between the camera position (PRP or COP I 
> believe) and the focal point (VRP). Maybe what we want is a boolean 
> indicating (assume VPN is -DOP) which is was what the (3 years or so ago) 
> old code did (but without the boolean). But that is confusing because the 
> shears being introduced are there to handle the case where VPN != -DOP. 
> With the shear angles set, a call to GetVPN that returns -DOP will be 
> misleading.
> 
> - Ken

One easy solution is to remove SetDirectionOfProjection(), I don't think
it has any real value anyway.  GetDirectionOfProjection() would be left
in.

Having both GetViewPlaneNormal() or GetDirectionOfProjection() is a
good thing.  However, I think that it is best if the only way to
set the DirectionOfProjection is via SetPosition(), SetFocalPoint().
And that the only way to create a VPN which is not -DOP is by explicitly
creating a shear by setting the angle between the view plane and the
position->focalpoint vector.

 - David

P.S. I've committed a fix for vtkCamera, the Zoom was broken by a typo.
     Next time I'll test things a bit more before committing.  Does 
     either the vtkbaseline or the main vtk module have the facilities 
     for running all the regression test automatically, like the 
     dashboard does? 




More information about the vtk-developers mailing list