Blender  V2.59
Functions | Variables
mathutils_Matrix.c File Reference
#include <Python.h>
#include "mathutils.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Functions

static PyObject * Matrix_copy (MatrixObject *self)
static int Matrix_ass_slice (MatrixObject *self, int begin, int end, PyObject *value)
static PyObject * matrix__apply_to_copy (PyNoArgsFunction matrix_func, MatrixObject *self)
static int mathutils_matrix_vector_check (BaseMathObject *bmo)
static int mathutils_matrix_vector_get (BaseMathObject *bmo, int subtype)
static int mathutils_matrix_vector_set (BaseMathObject *bmo, int subtype)
static int mathutils_matrix_vector_get_index (BaseMathObject *bmo, int subtype, int index)
static int mathutils_matrix_vector_set_index (BaseMathObject *bmo, int subtype, int index)
static PyObject * Matrix_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
static void matrix_3x3_as_4x4 (float mat[16])
 PyDoc_STRVAR (C_Matrix_Rotation_doc,".. classmethod:: Rotation(angle, size, axis)\n""\n"" Create a matrix representing a rotation.\n""\n"" :arg angle: The angle of rotation desired, in radians.\n"" :type angle: float\n"" :arg size: The size of the rotation matrix to construct [2, 4].\n"" :type size: int\n"" :arg axis: a string in ['X', 'Y', 'Z'] or a 3D Vector Object\n"" (optional when size is 2).\n"" :type axis: string or :class:`Vector`\n"" :return: A new rotation matrix.\n"" :rtype: :class:`Matrix`\n")
static PyObject * C_Matrix_Rotation (PyObject *cls, PyObject *args)
 PyDoc_STRVAR (C_Matrix_Translation_doc,".. classmethod:: Translation(vector)\n""\n"" Create a matrix representing a translation.\n""\n"" :arg vector: The translation vector.\n"" :type vector: :class:`Vector`\n"" :return: An identity matrix with a translation.\n"" :rtype: :class:`Matrix`\n")
static PyObject * C_Matrix_Translation (PyObject *cls, PyObject *value)
 PyDoc_STRVAR (C_Matrix_Scale_doc,".. classmethod:: Scale(factor, size, axis)\n""\n"" Create a matrix representing a scaling.\n""\n"" :arg factor: The factor of scaling to apply.\n"" :type factor: float\n"" :arg size: The size of the scale matrix to construct [2, 4].\n"" :type size: int\n"" :arg axis: Direction to influence scale. (optional).\n"" :type axis: :class:`Vector`\n"" :return: A new scale matrix.\n"" :rtype: :class:`Matrix`\n")
static PyObject * C_Matrix_Scale (PyObject *cls, PyObject *args)
 PyDoc_STRVAR (C_Matrix_OrthoProjection_doc,".. classmethod:: OrthoProjection(axis, size)\n""\n"" Create a matrix to represent an orthographic projection.\n""\n"" :arg axis: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n"" where a single axis is for a 2D matrix.\n"" Or a vector for an arbitrary axis\n"" :type axis: string or :class:`Vector`\n"" :arg size: The size of the projection matrix to construct [2, 4].\n"" :type size: int\n"" :return: A new projection matrix.\n"" :rtype: :class:`Matrix`\n")
static PyObject * C_Matrix_OrthoProjection (PyObject *cls, PyObject *args)
 PyDoc_STRVAR (C_Matrix_Shear_doc,".. classmethod:: Shear(plane, size, factor)\n""\n"" Create a matrix to represent an shear transformation.\n""\n"" :arg plane: Can be any of the following: ['X', 'Y', 'XY', 'XZ', 'YZ'],\n"" where a single axis is for a 2D matrix only.\n"" :type plane: string\n"" :arg size: The size of the shear matrix to construct [2, 4].\n"" :type size: int\n"" :arg factor: The factor of shear to apply. For a 3 or 4 *size* matrix\n"" pass a pair of floats corrasponding with the *plane* axis.\n"" :type factor: float or float pair\n"" :return: A new shear matrix.\n"" :rtype: :class:`Matrix`\n")
static PyObject * C_Matrix_Shear (PyObject *cls, PyObject *args)
void matrix_as_3x3 (float mat[3][3], MatrixObject *self)
static float matrix_determinant_internal (MatrixObject *self)
 PyDoc_STRVAR (Matrix_to_quaternion_doc,".. method:: to_quaternion()\n""\n"" Return a quaternion representation of the rotation matrix.\n""\n"" :return: Quaternion representation of the rotation matrix.\n"" :rtype: :class:`Quaternion`\n")
static PyObject * Matrix_to_quaternion (MatrixObject *self)
 PyDoc_STRVAR (Matrix_to_euler_doc,".. method:: to_euler(order, euler_compat)\n""\n"" Return an Euler representation of the rotation matrix\n"" (3x3 or 4x4 matrix only).\n""\n"" :arg order: Optional rotation order argument in\n"" ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"" :type order: string\n"" :arg euler_compat: Optional euler argument the new euler will be made\n"" compatible with (no axis flipping between them).\n"" Useful for converting a series of matrices to animation curves.\n"" :type euler_compat: :class:`Euler`\n"" :return: Euler representation of the matrix.\n"" :rtype: :class:`Euler`\n")
static PyObject * Matrix_to_euler (MatrixObject *self, PyObject *args)
 PyDoc_STRVAR (Matrix_resize_4x4_doc,".. method:: resize_4x4()\n""\n"" Resize the matrix to 4x4.\n")
static PyObject * Matrix_resize_4x4 (MatrixObject *self)
 PyDoc_STRVAR (Matrix_to_4x4_doc,".. method:: to_4x4()\n""\n"" Return a 4x4 copy of this matrix.\n""\n"" :return: a new matrix.\n"" :rtype: :class:`Matrix`\n")
static PyObject * Matrix_to_4x4 (MatrixObject *self)
 PyDoc_STRVAR (Matrix_to_3x3_doc,".. method:: to_3x3()\n""\n"" Return a 3x3 copy of this matrix.\n""\n"" :return: a new matrix.\n"" :rtype: :class:`Matrix`\n")
static PyObject * Matrix_to_3x3 (MatrixObject *self)
 PyDoc_STRVAR (Matrix_to_translation_doc,".. method:: to_translation()\n""\n"" Return a the translation part of a 4 row matrix.\n""\n"" :return: Return a the translation of a matrix.\n"" :rtype: :class:`Vector`\n")
static PyObject * Matrix_to_translation (MatrixObject *self)
 PyDoc_STRVAR (Matrix_to_scale_doc,".. method:: to_scale()\n""\n"" Return a the scale part of a 3x3 or 4x4 matrix.\n""\n"" :return: Return a the scale of a matrix.\n"" :rtype: :class:`Vector`\n""\n"" .. note:: This method does not return negative a scale on any axis because it is not possible to obtain this data from the matrix alone.\n")
static PyObject * Matrix_to_scale (MatrixObject *self)
 PyDoc_STRVAR (Matrix_invert_doc,".. method:: invert()\n""\n"" Set the matrix to its inverse.\n""\n"" .. note:: :exc:`ValueError` exception is raised.\n""\n"" .. seealso:: <http://en.wikipedia.org/wiki/Inverse_matrix>\n")
static PyObject * Matrix_invert (MatrixObject *self)
 PyDoc_STRVAR (Matrix_inverted_doc,".. method:: inverted()\n""\n"" Return an inverted copy of the matrix.\n""\n"" :return: the inverted matrix.\n"" :rtype: :class:`Matrix`\n""\n"" .. note:: :exc:`ValueError` exception is raised.\n")
static PyObject * Matrix_inverted (MatrixObject *self)
 PyDoc_STRVAR (Matrix_rotate_doc,".. method:: rotate(other)\n""\n"" Rotates the matrix a by another mathutils value.\n""\n"" :arg other: rotation component of mathutils value\n"" :type other: :class:`Euler`, :class:`Quaternion` or :class:`Matrix`\n""\n"" .. note:: If any of the columns are not unit length this may not have desired results.\n")
static PyObject * Matrix_rotate (MatrixObject *self, PyObject *value)
 PyDoc_STRVAR (Matrix_decompose_doc,".. method:: decompose()\n""\n"" Return the location, rotaion and scale components of this matrix.\n""\n"" :return: loc, rot, scale triple.\n"" :rtype: (:class:`Vector`, :class:`Quaternion`, :class:`Vector`)")
static PyObject * Matrix_decompose (MatrixObject *self)
 PyDoc_STRVAR (Matrix_lerp_doc,".. function:: lerp(other, factor)\n""\n"" Returns the interpolation of two matricies.\n""\n"" :arg other: value to interpolate with.\n"" :type other: :class:`Matrix`\n"" :arg factor: The interpolation value in [0.0, 1.0].\n"" :type factor: float\n"" :return: The interpolated rotation.\n"" :rtype: :class:`Matrix`\n")
static PyObject * Matrix_lerp (MatrixObject *self, PyObject *args)
 PyDoc_STRVAR (Matrix_determinant_doc,".. method:: determinant()\n""\n"" Return the determinant of a matrix.\n""\n"" :return: Return a the determinant of a matrix.\n"" :rtype: float\n""\n"" .. seealso:: <http://en.wikipedia.org/wiki/Determinant>\n")
static PyObject * Matrix_determinant (MatrixObject *self)
 PyDoc_STRVAR (Matrix_transpose_doc,".. method:: transpose()\n""\n"" Set the matrix to its transpose.\n""\n"" .. seealso:: <http://en.wikipedia.org/wiki/Transpose>\n")
static PyObject * Matrix_transpose (MatrixObject *self)
 PyDoc_STRVAR (Matrix_transposed_doc,".. method:: transposed()\n""\n"" Return a new, transposed matrix.\n""\n"" :return: a transposed matrix\n"" :rtype: :class:`Matrix`\n")
static PyObject * Matrix_transposed (MatrixObject *self)
 PyDoc_STRVAR (Matrix_zero_doc,".. method:: zero()\n""\n"" Set all the matrix values to zero.\n""\n"" :return: an instance of itself\n"" :rtype: :class:`Matrix`\n")
static PyObject * Matrix_zero (MatrixObject *self)
 PyDoc_STRVAR (Matrix_identity_doc,".. method:: identity()\n""\n"" Set the matrix to the identity matrix.\n""\n"" .. note:: An object with zero location and rotation, a scale of one,\n"" will have an identity matrix.\n""\n"" .. seealso:: <http://en.wikipedia.org/wiki/Identity_matrix>\n")
static PyObject * Matrix_identity (MatrixObject *self)
 PyDoc_STRVAR (Matrix_copy_doc,".. method:: copy()\n""\n"" Returns a copy of this matrix.\n""\n"" :return: an instance of itself\n"" :rtype: :class:`Matrix`\n")
static PyObject * Matrix_repr (MatrixObject *self)
static PyObject * Matrix_richcmpr (PyObject *a, PyObject *b, int op)
static int Matrix_len (MatrixObject *self)
static PyObject * Matrix_item (MatrixObject *self, int i)
static int Matrix_ass_item (MatrixObject *self, int i, PyObject *value)
static PyObject * Matrix_slice (MatrixObject *self, int begin, int end)
static PyObject * Matrix_add (PyObject *m1, PyObject *m2)
static PyObject * Matrix_sub (PyObject *m1, PyObject *m2)
static PyObject * matrix_mul_float (MatrixObject *mat, const float scalar)
static PyObject * Matrix_mul (PyObject *m1, PyObject *m2)
static PyObject * Matrix_inv (MatrixObject *self)
static PyObject * Matrix_subscript (MatrixObject *self, PyObject *item)
static int Matrix_ass_subscript (MatrixObject *self, PyObject *item, PyObject *value)
static PyObject * Matrix_getRowSize (MatrixObject *self, void *UNUSED(closure))
static PyObject * Matrix_getColSize (MatrixObject *self, void *UNUSED(closure))
static PyObject * Matrix_median_scale_get (MatrixObject *self, void *UNUSED(closure))
static PyObject * Matrix_is_negative_get (MatrixObject *self, void *UNUSED(closure))
static PyObject * Matrix_is_orthogonal_get (MatrixObject *self, void *UNUSED(closure))
 PyDoc_STRVAR (matrix_doc,"This object gives access to Matrices in Blender.")
PyObject * newMatrixObject (float *mat, const unsigned short rowSize, const unsigned short colSize, int type, PyTypeObject *base_type)
PyObject * newMatrixObject_cb (PyObject *cb_user, int rowSize, int colSize, int cb_type, int cb_subtype)

Variables

int mathutils_matrix_vector_cb_index = -1
Mathutils_Callback mathutils_matrix_vector_cb
static PySequenceMethods Matrix_SeqMethods
static PyMappingMethods Matrix_AsMapping
static PyNumberMethods Matrix_NumMethods
static PyGetSetDef Matrix_getseters []
static struct PyMethodDef Matrix_methods []
PyTypeObject matrix_Type

Function Documentation

static PyObject* C_Matrix_OrthoProjection ( PyObject *  cls,
PyObject *  args 
) [static]
static PyObject* C_Matrix_Rotation ( PyObject *  cls,
PyObject *  args 
) [static]
static PyObject* C_Matrix_Scale ( PyObject *  cls,
PyObject *  args 
) [static]
static PyObject* C_Matrix_Shear ( PyObject *  cls,
PyObject *  args 
) [static]
static PyObject* C_Matrix_Translation ( PyObject *  cls,
PyObject *  value 
) [static]
static int mathutils_matrix_vector_check ( BaseMathObject bmo) [static]

Definition at line 47 of file mathutils_Matrix.c.

References BaseMath_ReadCallback.

static int mathutils_matrix_vector_get ( BaseMathObject bmo,
int  subtype 
) [static]

Definition at line 53 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, and i.

static int mathutils_matrix_vector_get_index ( BaseMathObject bmo,
int  subtype,
int  index 
) [static]

Definition at line 82 of file mathutils_Matrix.c.

References BaseMath_ReadCallback.

static int mathutils_matrix_vector_set ( BaseMathObject bmo,
int  subtype 
) [static]

Definition at line 67 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, BaseMath_WriteCallback, and i.

static int mathutils_matrix_vector_set_index ( BaseMathObject bmo,
int  subtype,
int  index 
) [static]

Definition at line 93 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, and BaseMath_WriteCallback.

static void matrix_3x3_as_4x4 ( float  mat[16]) [static]
static PyObject * matrix__apply_to_copy ( PyNoArgsFunction  matrix_func,
MatrixObject self 
) [static]

Definition at line 163 of file mathutils_Matrix.c.

References Matrix_copy(), and NULL.

Referenced by Matrix_inverted(), and Matrix_transposed().

static PyObject* Matrix_add ( PyObject *  m1,
PyObject *  m2 
) [static]
void matrix_as_3x3 ( float  mat[3][3],
MatrixObject self 
)
static int Matrix_ass_item ( MatrixObject self,
int  i,
PyObject *  value 
) [static]
static int Matrix_ass_slice ( MatrixObject self,
int  begin,
int  end,
PyObject *  value 
) [static]
static int Matrix_ass_subscript ( MatrixObject self,
PyObject *  item,
PyObject *  value 
) [static]

Definition at line 1701 of file mathutils_Matrix.c.

References i, Matrix_ass_item(), and Matrix_ass_slice().

static PyObject * Matrix_copy ( MatrixObject self) [static]

Definition at line 1296 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, newMatrixObject(), NULL, and Py_NEW.

Referenced by matrix__apply_to_copy().

static PyObject* Matrix_decompose ( MatrixObject self) [static]
static PyObject* Matrix_determinant ( MatrixObject self) [static]

Definition at line 1164 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, matrix_determinant_internal(), and NULL.

static float matrix_determinant_internal ( MatrixObject self) [static]

Definition at line 651 of file mathutils_Matrix.c.

References determinant_m2(), determinant_m3(), and determinant_m4().

Referenced by Matrix_determinant(), and Matrix_invert().

static PyObject* Matrix_getColSize ( MatrixObject self,
void *  UNUSEDclosure 
) [static]

Definition at line 1782 of file mathutils_Matrix.c.

static PyObject* Matrix_getRowSize ( MatrixObject self,
void *  UNUSEDclosure 
) [static]

Definition at line 1777 of file mathutils_Matrix.c.

static PyObject* Matrix_identity ( MatrixObject self) [static]

Definition at line 1257 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, BaseMath_WriteCallback, NULL, unit_m3(), and unit_m4().

Referenced by newMatrixObject().

static PyObject* Matrix_inv ( MatrixObject self) [static]

Definition at line 1642 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, Matrix_invert(), and NULL.

static PyObject* Matrix_invert ( MatrixObject self) [static]
static PyObject* Matrix_inverted ( MatrixObject self) [static]

Definition at line 1026 of file mathutils_Matrix.c.

References matrix__apply_to_copy(), and Matrix_invert().

static PyObject* Matrix_is_negative_get ( MatrixObject self,
void *  UNUSEDclosure 
) [static]

Definition at line 1807 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, is_negative_m3(), is_negative_m4(), and NULL.

static PyObject* Matrix_is_orthogonal_get ( MatrixObject self,
void *  UNUSEDclosure 
) [static]
static PyObject* Matrix_item ( MatrixObject self,
int  i 
) [static]
static int Matrix_len ( MatrixObject self) [static]

Definition at line 1380 of file mathutils_Matrix.c.

static PyObject* Matrix_lerp ( MatrixObject self,
PyObject *  args 
) [static]
static PyObject* Matrix_median_scale_get ( MatrixObject self,
void *  UNUSEDclosure 
) [static]

Definition at line 1787 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, mat3_to_scale(), matrix_as_3x3(), and NULL.

static PyObject* Matrix_mul ( PyObject *  m1,
PyObject *  m2 
) [static]
static PyObject* matrix_mul_float ( MatrixObject mat,
const float  scalar 
) [static]
static PyObject* Matrix_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
) [static]

Definition at line 118 of file mathutils_Matrix.c.

References Matrix_ass_slice(), newMatrixObject(), NULL, and Py_NEW.

static PyObject* Matrix_repr ( MatrixObject self) [static]

Definition at line 1306 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, MATRIX_MAX_DIM, and NULL.

static PyObject* Matrix_resize_4x4 ( MatrixObject self) [static]

Definition at line 782 of file mathutils_Matrix.c.

References NULL, and Py_WRAP.

static PyObject* Matrix_richcmpr ( PyObject *  a,
PyObject *  b,
int  op 
) [static]
static PyObject* Matrix_rotate ( MatrixObject self,
PyObject *  value 
) [static]
static PyObject* Matrix_slice ( MatrixObject self,
int  begin,
int  end 
) [static]
static PyObject* Matrix_sub ( PyObject *  m1,
PyObject *  m2 
) [static]
static PyObject* Matrix_subscript ( MatrixObject self,
PyObject *  item 
) [static]

Definition at line 1665 of file mathutils_Matrix.c.

References i, Matrix_item(), Matrix_slice(), and NULL.

static PyObject* Matrix_to_3x3 ( MatrixObject self) [static]

Definition at line 873 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, matrix_as_3x3(), newMatrixObject(), NULL, and Py_NEW.

static PyObject* Matrix_to_4x4 ( MatrixObject self) [static]

Definition at line 845 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, copy_m4_m3(), newMatrixObject(), NULL, and Py_NEW.

static PyObject* Matrix_to_euler ( MatrixObject self,
PyObject *  args 
) [static]
static PyObject* Matrix_to_quaternion ( MatrixObject self) [static]
static PyObject* Matrix_to_scale ( MatrixObject self) [static]
static PyObject* Matrix_to_translation ( MatrixObject self) [static]

Definition at line 899 of file mathutils_Matrix.c.

References BaseMath_ReadCallback, newVectorObject(), NULL, and Py_NEW.

static PyObject* Matrix_transpose ( MatrixObject self) [static]
static PyObject* Matrix_transposed ( MatrixObject self) [static]

Definition at line 1223 of file mathutils_Matrix.c.

References matrix__apply_to_copy(), and Matrix_transpose().

static PyObject* Matrix_zero ( MatrixObject self) [static]

Definition at line 1237 of file mathutils_Matrix.c.

References BaseMath_WriteCallback, fill_vn(), and NULL.

PyObject* newMatrixObject ( float *  mat,
const unsigned short  rowSize,
const unsigned short  colSize,
int  type,
PyTypeObject *  base_type 
)
PyObject* newMatrixObject_cb ( PyObject *  cb_user,
int  rowSize,
int  colSize,
int  cb_type,
int  cb_subtype 
)

Definition at line 2033 of file mathutils_Matrix.c.

References newMatrixObject(), and Py_NEW.

Referenced by pyrna_math_object_from_array().

PyDoc_STRVAR ( C_Matrix_Rotation_doc  ,
".. classmethod:: Rotation(angle, size, axis)\n""\n"" Create a matrix representing a rotation.\n""\n"" :arg angle: The angle of rotation  desired,
in radians.\n"":type angle:float\n"":arg size:The size of the rotation matrix to construct.\n"":type size:int\n"":arg axis:a string inor a 3D Vector Object\n""(optional when size is 2).\n"":type axis:string or:class:`Vector`\n"":return:A new rotation matrix.\n"":rtype::class:`Matrix`\n"  [2, 4]['X', 'Y', 'Z'] 
)
PyDoc_STRVAR ( C_Matrix_Translation_doc  ,
".. classmethod:: Translation(vector)\n""\n"" Create a matrix representing a translation.\n""\n"" :arg vector: The translation vector.\n"" :type vector: :class:`Vector`\n"" :return: An identity matrix with a translation.\n"" :rtype: :class:`Matrix`\n"   
)
PyDoc_STRVAR ( C_Matrix_Scale_doc  ,
".. classmethod:: Scale(factor, size, axis)\n""\n"" Create a matrix representing a scaling.\n""\n"" :arg factor: The factor of scaling to apply.\n"" :type factor: float\n"" :arg size: The size of the scale matrix to construct .\n"" :type size: int\n"" :arg axis: Direction to influence scale. (optional).\n"" :type axis: :class:`Vector`\n"" :return: A new scale matrix.\n"" :rtype: :class:`Matrix`\n"  [2, 4] 
)
PyDoc_STRVAR ( C_Matrix_OrthoProjection_doc  ,
".. classmethod:: OrthoProjection(axis, size)\n""\n"" Create a matrix to represent an orthographic projection.\n""\n"" :arg axis: Can be any of the following:   ['X', 'Y', 'XY', 'XZ', 'YZ'],
\n""where a single axis is for a 2D matrix.\n""Or a vector for an arbitrary axis\n"":type axis:string or:class:`Vector`\n"":arg size:The size of the projection matrix to construct.\n"":type size:int\n"":return:A new projection matrix.\n"":rtype::class:`Matrix`\n"  [2, 4] 
)
PyDoc_STRVAR ( C_Matrix_Shear_doc  ,
".. classmethod:: Shear(plane, size, factor)\n""\n"" Create a matrix to represent an shear transformation.\n""\n"" :arg plane: Can be any of the following:   ['X', 'Y', 'XY', 'XZ', 'YZ'],
\n""where a single axis is for a 2D matrix only.\n"":type plane:string\n"":arg size:The size of the shear matrix to construct.\n"":type size:int\n"":arg factor:The factor of shear to apply.For a 3 or 4 *size *matrix\n""pass a pair of floats corrasponding with the *plane *axis.\n"":type factor:float or float pair\n"":return:A new shear matrix.\n"":rtype::class:`Matrix`\n"  [2, 4] 
)
PyDoc_STRVAR ( Matrix_to_quaternion_doc  ,
".. method:: to_quaternion()\n""\n"" Return a quaternion representation of the rotation matrix.\n""\n"" :return: Quaternion representation of the rotation matrix.\n"" :rtype: :class:`Quaternion`\n"   
)
PyDoc_STRVAR ( Matrix_to_euler_doc  ,
".. method:: to_euler(order, euler_compat)\n""\n"" Return an Euler representation of the rotation matrix\n"" (3x3 or 4x4 matrix only).\n""\n"" :arg order: Optional rotation order argument in\n"" .\n"" :type order: string\n"" :arg euler_compat: Optional euler argument the new euler will be made\n"" compatible with (no axis flipping between them).\n"" Useful for converting a series of matrices to animation curves.\n"" :type euler_compat: :class:`Euler`\n"" :return: Euler representation of the matrix.\n"" :rtype: :class:`Euler`\n"  ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'] 
)
PyDoc_STRVAR ( Matrix_resize_4x4_doc  ,
".. method:: resize_4x4()\n""\n"" Resize the matrix to 4x4.\n"   
)
PyDoc_STRVAR ( Matrix_to_4x4_doc  ,
".. method:: to_4x4()\n""\n"" Return a 4x4 copy of this matrix.\n""\n"" :return: a new matrix.\n"" :rtype: :class:`Matrix`\n"   
)
PyDoc_STRVAR ( Matrix_to_3x3_doc  ,
".. method:: to_3x3()\n""\n"" Return a 3x3 copy of this matrix.\n""\n"" :return: a new matrix.\n"" :rtype: :class:`Matrix`\n"   
)
PyDoc_STRVAR ( Matrix_to_translation_doc  ,
".. method:: to_translation()\n""\n"" Return a the translation part of a 4 row matrix.\n""\n"" :return: Return a the translation of a matrix.\n"" :rtype: :class:`Vector`\n"   
)
PyDoc_STRVAR ( Matrix_to_scale_doc  ,
".. method:: to_scale()\n""\n"" Return a the scale part of a 3x3 or 4x4 matrix.\n""\n"" :return: Return a the scale of a matrix.\n"" :rtype: :class:`Vector`\n""\n"" .. note:: This method does not return negative a scale on any axis because it is not possible to obtain this data from the matrix alone.\n"   
)
PyDoc_STRVAR ( Matrix_invert_doc  ,
".. method:: invert()\n""\n"" Set the matrix to its inverse.\n""\n"" .. note:: :exc:`ValueError` exception is raised.\n""\n"" .. seealso:: <http://en.wikipedia.org/wiki/Inverse_matrix>\n"   
)
PyDoc_STRVAR ( Matrix_inverted_doc  ,
".. method:: inverted()\n""\n"" Return an inverted copy of the matrix.\n""\n"" :return: the inverted matrix.\n"" :rtype: :class:`Matrix`\n""\n"" .. note:: :exc:`ValueError` exception is raised.\n"   
)
PyDoc_STRVAR ( Matrix_rotate_doc  ,
".. method:: rotate(other)\n""\n"" Rotates the matrix a by another mathutils value.\n""\n"" :arg other: rotation component of mathutils value\n"" :type other: :class:`Euler`  ,
:class:`Quaternion`or:class:`Matrix`\n""\n""..note::If any of the columns are not unit length this may not have desired results.\n"   
)
PyDoc_STRVAR ( Matrix_decompose_doc  ,
".. method:: decompose()\n""\n"" Return the  location,
rotaion and scale components of this matrix.\n""\n"":return:loc  ,
rot  ,
scale triple.\n"":rtype:(:class:`Vector`,:class:`Quaternion`,:class:`Vector`)"   
)
PyDoc_STRVAR ( Matrix_lerp_doc  ,
".. function:: lerp(other, factor)\n""\n"" Returns the interpolation of two matricies.\n""\n"" :arg other: value to interpolate with.\n"" :type other: :class:`Matrix`\n"" :arg factor: The interpolation value in .\n"" :type factor: float\n"" :return: The interpolated rotation.\n"" :rtype: :class:`Matrix`\n"  [0.0, 1.0] 
)
PyDoc_STRVAR ( Matrix_determinant_doc  ,
".. method:: determinant()\n""\n"" Return the determinant of a matrix.\n""\n"" :return: Return a the determinant of a matrix.\n"" :rtype: float\n""\n"" .. seealso:: <http://en.wikipedia.org/wiki/Determinant>\n"   
)
PyDoc_STRVAR ( Matrix_transpose_doc  ,
".. method:: transpose()\n""\n"" Set the matrix to its transpose.\n""\n"" .. seealso:: <http://en.wikipedia.org/wiki/Transpose>\n"   
)
PyDoc_STRVAR ( Matrix_transposed_doc  ,
".. method:: transposed()\n""\n"" Return a  new,
transposed matrix.\n""\n"":return:a transposed matrix\n"":rtype::class:`Matrix`\n"   
)
PyDoc_STRVAR ( Matrix_zero_doc  ,
".. method:: zero()\n""\n"" Set all the matrix values to zero.\n""\n"" :return: an instance of itself\n"" :rtype: :class:`Matrix`\n"   
)
PyDoc_STRVAR ( Matrix_identity_doc  ,
".. method:: identity()\n""\n"" Set the matrix to the identity matrix.\n""\n"" .. note:: An object with zero location and  rotation,
a scale of  one,
\n""will have an identity matrix.\n""\n""..seealso::< http://en.wikipedia.org/wiki/Identity_matrix >\n"   
)
PyDoc_STRVAR ( Matrix_copy_doc  ,
".. method:: copy()\n""\n"" Returns a copy of this matrix.\n""\n"" :return: an instance of itself\n"" :rtype: :class:`Matrix`\n"   
)
PyDoc_STRVAR ( matrix_doc  ,
"This object gives access to Matrices in Blender."   
)

Variable Documentation

Definition at line 45 of file mathutils_Matrix.c.

Referenced by Matrix_item(), Matrix_slice(), and PyInit_mathutils().

PyMappingMethods Matrix_AsMapping [static]
Initial value:
 {
        (lenfunc)Matrix_len,
        (binaryfunc)Matrix_subscript,
        (objobjargproc)Matrix_ass_subscript
}

Definition at line 1733 of file mathutils_Matrix.c.

PyGetSetDef Matrix_getseters[] [static]
Initial value:
 {
        {(char *)"row_size", (getter)Matrix_getRowSize, (setter)NULL, (char *)"The row size of the matrix (readonly).\n\n:type: int", NULL},
        {(char *)"col_size", (getter)Matrix_getColSize, (setter)NULL, (char *)"The column size of the matrix (readonly).\n\n:type: int", NULL},
        {(char *)"median_scale", (getter)Matrix_median_scale_get, (setter)NULL, (char *)"The average scale applied to each axis (readonly).\n\n:type: float", NULL},
        {(char *)"is_negative", (getter)Matrix_is_negative_get, (setter)NULL, (char *)"True if this matrix results in a negative scale, 3x3 and 4x4 only, (readonly).\n\n:type: bool", NULL},
        {(char *)"is_orthogonal", (getter)Matrix_is_orthogonal_get, (setter)NULL, (char *)"True if this matrix is orthogonal, 3x3 and 4x4 only, (readonly).\n\n:type: bool", NULL},
        {(char *)"is_wrapped", (getter)BaseMathObject_getWrapped, (setter)NULL, (char *)BaseMathObject_Wrapped_doc, NULL},
        {(char *)"owner",(getter)BaseMathObject_getOwner, (setter)NULL, (char *)BaseMathObject_Owner_doc, NULL},
        {NULL, NULL, NULL, NULL, NULL}  
}

Definition at line 1846 of file mathutils_Matrix.c.

struct PyMethodDef Matrix_methods[] [static]

Definition at line 1858 of file mathutils_Matrix.c.

PyNumberMethods Matrix_NumMethods [static]

Definition at line 1740 of file mathutils_Matrix.c.

PySequenceMethods Matrix_SeqMethods [static]
Initial value:
 {
        (lenfunc) Matrix_len,                                           
        (binaryfunc) NULL,                                                      
        (ssizeargfunc) NULL,                                            
        (ssizeargfunc) Matrix_item,                                     
        (ssizessizeargfunc) NULL,                                       
        (ssizeobjargproc) Matrix_ass_item,                      
        (ssizessizeobjargproc) NULL,                            
        (objobjproc) NULL,                                                      
        (binaryfunc) NULL,                                                      
        (ssizeargfunc) NULL,                                            
}

Definition at line 1651 of file mathutils_Matrix.c.

PyTypeObject matrix_Type

Definition at line 1902 of file mathutils_Matrix.c.

Referenced by Matrix_lerp(), and PyInit_mathutils().