FreeMat
|
Section: Visualization Toolkit Common Classes
This is a very simple class which allows a vtkMatrix4x4 to be used in place of a vtkHomogeneousTransform or vtkAbstractTransform. For example, if you use it as a proxy between a matrix and vtkTransformPolyDataFilter then any modifications to the matrix will automatically be reflected in the output of the filter.
To create an instance of class vtkMatrixToHomogeneousTransform, simply invoke its constructor as follows
obj = vtkMatrixToHomogeneousTransform
The class vtkMatrixToHomogeneousTransform 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 vtkMatrixToHomogeneousTransform class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkMatrixToHomogeneousTransform = obj.NewInstance ()
vtkMatrixToHomogeneousTransform = obj.SafeDownCast (vtkObject o)
obj.SetInput (vtkMatrix4x4 )
vtkMatrix4x4 = obj.GetInput ()
obj.Inverse ()
- The input matrix is left as-is, but the transformation matrix is inverted. long = obj.GetMTime ()
- Get the MTime: this is the bit of magic that makes everything work. vtkAbstractTransform = obj.MakeTransform ()
- Make a new transform of the same type. obj.SetMatrix (vtkMatrix4x4 matrix)
-