vtkCamera issues

David Gobbi dgobbi at irus.rri.on.ca
Wed Apr 19 21:34:41 EDT 2000


Hi All,

There were a couple regression tests, 'AllWriters.tcl' and
'byuReader.tcl,' which were failing because they didn't call
ComputeViewPlaneNormal() after setting up the camera.

These examples used to produce some weird shear projection because
vtkCamera used to compute the View matrix based on a combination of
Position-FocalPoint and ViewPlaneNormal.  My recent vtkCamera
changes compute the View matrix using just Position-FocalPoint
(and ViewUp, of course).  

So my question is this:  how would people feel if I deprecated
SetViewPlaneNormal() and caused the ViewPlaneNormal to be 
automatically calculated every time SetPosition() or 
SetFocalPoint() was called?

If this was done, paranoid code like this (straight from
the VTK regression tests) could hopefully be avoided:

vtkCamera aCam
    aCam SetFocalPoint 0.00657892 0 2.41026
    aCam SetPosition -1.94838 -47.1275 39.4607
    aCam ComputeViewPlaneNormal
    aCam SetViewPlaneNormal -0.0325936 -0.785725 0.617717
    aCam SetViewUp 0.00653193 0.617865 0.786257
    aCam SetClippingRange 1 100

and replaced with more concise code:

vtkCamera aCam
    aCam SetFocalPoint 0.00657892 0 2.41026
    aCam SetPosition -1.94838 -47.1275 39.4607
    aCam SetViewUp 0.00653193 0.617865 0.786257
    aCam SetClippingRange 1 100

Any thoughts? 

   - David

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario






More information about the vtk-developers mailing list