FreeMat: vtkMatrix4x4

FreeMat

- Main Page
- Related Pages

vtkMatrix4x4

Section: Visualization Toolkit Common Classes

# Usage

vtkMatrix4x4 is a class to represent and manipulate 4x4 matrices. Specifically, it is designed to work on 4x4 transformation matrices found in 3D rendering using homogeneous coordinates [x y z w].

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

      obj = vtkMatrix4x4

# Methods

The class vtkMatrix4x4 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 vtkMatrix4x4 class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkMatrix4x4 = obj.NewInstance ()`
- `vtkMatrix4x4 = obj.SafeDownCast (vtkObject o)`
- `obj.DeepCopy (vtkMatrix4x4 source)` - Non-static member function. Assigns from elements array
- `obj.DeepCopy (double Elements[16])` - Set all of the elements to zero.
- `obj.Zero ()` - Set equal to Identity matrix
- `obj.Identity ()` - Matrix Inversion (adapted from Richard Carling in "Graphics Gems," Academic Press, 1990).
- `obj.Invert ()` - Transpose the matrix and put it into out.
- `obj.Transpose ()` - Multiply a homogeneous coordinate by this matrix, i.e. out = A*in. The in[4] and out[4] can be the same array.
- `obj.MultiplyPoint (float in[4], float out[4])` - Multiply a homogeneous coordinate by this matrix, i.e. out = A*in. The in[4] and out[4] can be the same array.
- `obj.MultiplyPoint (double in[4], double out[4])` - For use in Java, Python or Tcl. The default MultiplyPoint() uses a single-precision point.
- `float = obj.MultiplyPoint (float in[4])` - For use in Java, Python or Tcl. The default MultiplyPoint() uses a single-precision point.
- `float = obj.MultiplyFloatPoint (float in[4])` - For use in Java, Python or Tcl. The default MultiplyPoint() uses a single-precision point.
- `double = obj.MultiplyDoublePoint (double in[4])` - Multiplies matrices a and b and stores the result in c.
- `obj.Adjoint (vtkMatrix4x4 in, vtkMatrix4x4 out)` - Compute the determinant of the matrix and return it.
- `double = obj.Determinant ()` - Sets the element i,j in the matrix.
- `obj.SetElement (int i, int j, double value)` - Sets the element i,j in the matrix.
- `double = obj.GetElement (int i, int j) const`