Module Mathutils :: Class Matrix
[frames | no frames]

Class Matrix


The Matrix Object

This object gives access to Matrices in Blender.
Method Summary
New matrix object. __init__(list1, list2, list3, list4)
Create a new matrix object from initialized values.
int determinant()
Return a the determinant of a matrix.
  identity()
Set the matrix to the identity matrix.
  invert()
Set the matrix to it's inverse.
  resize4x4()
Resize the matrix to by 4x4
Matrix object. rotationPart()
Return the 3d rotation matrix.
Euler object toEuler()
Return a euler representing the rotation matrix.
Quaternion object toQuat()
Return a quaternion representation the rotation matrix
Vector object. translationPart()
Return a the translation part of a 4 row matrix.
  transpose()
Set the matrix to it's transpose.
  zero()
Set all matrix values to 0.

Class Variable Summary
  colsize: The column size of the matrix.
  rowsize: The row size of the matrix.

Method Details

__init__(list1=None, list2=None, list3=None, list4=None)
(Constructor)

Create a new matrix object from initialized values.

Example:
 matrix = Mathutils.Matrix([1,1,1],[0,1,0],[1,0,0])
Parameters:
list1 - A 2d,3d or 4d list.
           (type=PyList of int/float)
list2 - A 2d,3d or 4d list.
           (type=PyList of int/float)
list3 - A 2d,3d or 4d list.
           (type=PyList of int/float)
list4 - A 2d,3d or 4d list.
           (type=PyList of int/float)
Returns:
It depends wheter a parameter was passed:
  • (list1, etc.): Matrix object initialized with the given values;
  • (): An empty 3 dimensional matrix.

           (type=New matrix object.)

determinant()

Return a the determinant of a matrix.
Returns:
Return a the determinant of a matrix.
           (type=int)

identity()

Set the matrix to the identity matrix.

invert()

Set the matrix to it's inverse.

resize4x4()

Resize the matrix to by 4x4

rotationPart()

Return the 3d rotation matrix.
Returns:
Return the 3d rotation matrix.
           (type=Matrix object.)

toEuler()

Return a euler representing the rotation matrix.
Returns:
Return a euler representing the rotation matrix.
           (type=Euler object)

toQuat()

Return a quaternion representation the rotation matrix
Returns:
Quaternion representation the rotation matrix
           (type=Quaternion object)

translationPart()

Return a the translation part of a 4 row matrix.
Returns:
Return a the translation of a matrix.
           (type=Vector object.)

transpose()

Set the matrix to it's transpose.

zero()

Set all matrix values to 0.

Class Variable Details

colsize

The column size of the matrix.

rowsize

The row size of the matrix.

Generated by Epydoc 2.1 on Thu Aug 12 21:47:29 2004 http://epydoc.sf.net