New vtkCamera class
David Gobbi
dgobbi at irus.rri.on.ca
Mon May 1 15:35:38 EDT 2000
Hi all,
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 1: SetViewPlaneNormal(), ComputeViewPlaneNormal()
Both of these methods are deprecated, and will print a warning
if you use them. The ViewPlaneNormal is always automatically
calculated now, and GetViewPlaneNormal() works as before.
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.
If you want to determine whether a surface normal is pointing
towards or away from the screen, you should still use
GetViewPlaneNormal() as before.
Item 3: SetObliqueAngles(alpha,phi)
Most people will never use this... this new method allows you to
specify the orientation of the ViewPlaneNormal relative to the
DirectionOfProjection. It results in a shear distortion of the
projection matrix.
Item 4: GetViewTransform()
Get the view transform for the camera. This transform is always
up-to-date with respect to the camera Ivars. There is no
SetViewTransform() method, but one could be added in the future.
Item 5: GetOrientation()
This method used to return double *, now it returns float *.
The reason for this change was code simplification.
Rationale:
The primary reason for these changes are that I was tired
of getting weird, distorted camera views when I set the
ViewPlaneNormal incorrectly. The rest of the changes reflect
a clean-up of the source code.
- David
--
David Gobbi, MSc dgobbi at irus.rri.on.ca
Advanced Imaging Research Group
Robarts Research Institute, University of Western Ontario
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list