vtkPerspectiveTransform

Section: Visualization Toolkit Common Classes

Usage

A vtkPerspectiveTransform can be used to describe the full range of homogeneous transformations. It was designed in particular to describe a camera-view of a scene. <P>The order in which you set up the display coordinates (via AdjustZBuffer() and AdjustViewport()), the projection (via Perspective(), Frustum(), or Ortho()) and the camera view (via SetupCamera()) are important. If the transform is in PreMultiply mode, which is the default, set the Viewport and ZBuffer first, then the projection, and finally the camera view. Once the view is set up, the Translate and Rotate methods can be used to move the camera around in world coordinates. If the Oblique() or Stereo() methods are used, they should be called just before SetupCamera(). <P>In PostMultiply mode, you must perform all transformations in the opposite order. This is necessary, for example, if you already have a perspective transformation set up but must adjust the viewport. Another example is if you have a view transformation, and wish to perform translations and rotations in the camera's coordinate system rather than in world coordinates. <P>The SetInput and Concatenate methods can be used to create a transformation pipeline with vtkPerspectiveTransform. See vtkTransform for more information on the transformation pipeline.

To create an instance of class vtkPerspectiveTransform, simply invoke its constructor as follows

  obj = vtkPerspectiveTransform

Methods

The class vtkPerspectiveTransform has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkPerspectiveTransform class.