VTK 互动/视角变换/动态效果 正在编辑中

来源:互联网 发布:软件测试技术培训 编辑:程序博客网 时间:2024/06/10 19:35

线索

 

 

vtkHomogeneousTransform

#include <vtkActor.h>

 

superclass for homogeneous transformations

vtkHomogeneousTransform provides a generic interface for homogeneous transformations, i.e. transformations which can be represented by multiplying a 4x4 matrix with a homogeneous coordinate.

 

 

vtkPerspectiveTransform

#include <vtkPerspectiveTransform.h>

http://www.vtk.org/doc/nightly/html/classvtkPerspectiveTransform.html

 

describes linear transformations via a 4x4 matrix

A vtkTransform can be used to describe the full range of linear (also known as affine) coordinate transformations in three dimensions, which are internally represented as a 4x4 homogeneous transformation matrix. When you create a new vtkTransform, it is always initialized to the identity transformation.

The SetInput() method allows you to set another transform, instead of the identity transform, to be the base transformation. There is a pipeline mechanism to ensure that when the input is modified, the current transformation will be updated accordingly. This pipeline mechanism is also supported by the Concatenate() method.

Most of the methods for manipulating this transformation, e.g. Translate, Rotate, and Concatenate, can operate in either PreMultiply (the default) or PostMultiply mode. In PreMultiply mode, the translation, concatenation, etc. will occur before any transformations which are represented by the current matrix. In PostMultiply mode, the additional transformation will occur after any transformations represented by the current matrix.

This class performs all of its operations in a right handed coordinate system with right handed rotations. Some other graphics libraries use left handed coordinate systems and rotations.

 

 

vtkCamera

#include <vtkCamera.h>

http://www.vtk.org/doc/nightly/html/classvtkCamera.html

 

a virtual camera for 3D rendering

vtkCamera is a virtual camera for 3D rendering. It provides methods to position and orient the view point and focal point. Convenience methods for moving about the focal point also are provided. More complex methods allow the manipulation of the computer graphics model including view up vector, clipping planes, and camera perspective.

 

 

vtkActor

#include <vtkActor.h>

http://www.vtk.org/doc/nightly/html/classvtkActor.html

 

represents an object (geometry & properties) in a rendered scene

vtkActor is used to represent an entity in a rendering scene. It inherits functions related to the actors position, and orientation from vtkProp. The actor also has scaling and maintains a reference to the defining geometry (i.e., the mapper), rendering properties, and possibly a texture map. vtkActor combines these instance variables into one 4x4 transformation matrix as follows: [x y z 1] = [x y z 1] Translate(-origin) Scale(scale) Rot(y) Rot(x) Rot (z) Trans(origin) Trans(position)

 

 

vtkProp3D

#include <vtkProp3D.h>

 

represents an 3D object for placement in a rendered scene

vtkProp3D is an abstract class used to represent an entity in a rendering scene (i.e., vtkProp3D is a vtkProp with an associated transformation matrix). It handles functions related to the position, orientation and scaling. It combines these instance variables into one 4x4 transformation matrix as follows: [x y z 1] = [x y z 1] Translate(-origin) Scale(scale) Rot(y) Rot(x) Rot (z) Trans(origin) Trans(position). Both vtkActor and vtkVolume are specializations of class vtkProp. The constructor defaults to: origin(0,0,0) position=(0,0,0) orientation=(0,0,0), no user defined matrix or transform, and no texture map.