Blender V2.61 - r43446
|
#include <Python.h>
#include "mathutils.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BLI_dynstr.h"
Go to the source code of this file.
Classes | |
struct | MatrixAccessObject |
Typedefs | |
typedef enum eMatrixAccess_t | eMatrixAccess_t |
Enumerations | |
enum | eMatrixAccess_t { MAT_ACCESS_ROW, MAT_ACCESS_COL } |
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 PyObject * | MatrixAccess_CreatePyObject (MatrixObject *matrix, const eMatrixAccess_t type) |
static int | matrix_row_vector_check (MatrixObject *mat, VectorObject *vec, int row) |
static int | matrix_col_vector_check (MatrixObject *mat, VectorObject *vec, int col) |
static int | mathutils_matrix_row_check (BaseMathObject *bmo) |
static int | mathutils_matrix_row_get (BaseMathObject *bmo, int row) |
static int | mathutils_matrix_row_set (BaseMathObject *bmo, int row) |
static int | mathutils_matrix_row_get_index (BaseMathObject *bmo, int row, int col) |
static int | mathutils_matrix_row_set_index (BaseMathObject *bmo, int row, int col) |
static int | mathutils_matrix_col_check (BaseMathObject *bmo) |
static int | mathutils_matrix_col_get (BaseMathObject *bmo, int col) |
static int | mathutils_matrix_col_set (BaseMathObject *bmo, int col) |
static int | mathutils_matrix_col_get_index (BaseMathObject *bmo, int col, int row) |
static int | mathutils_matrix_col_set_index (BaseMathObject *bmo, int col, int row) |
static int | mathutils_matrix_translation_check (BaseMathObject *bmo) |
static int | mathutils_matrix_translation_get (BaseMathObject *bmo, int col) |
static int | mathutils_matrix_translation_set (BaseMathObject *bmo, int col) |
static int | mathutils_matrix_translation_get_index (BaseMathObject *bmo, int col, int row) |
static int | mathutils_matrix_translation_set_index (BaseMathObject *bmo, int col, int row) |
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 matrices.\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_str (MatrixObject *self) |
static PyObject * | Matrix_richcmpr (PyObject *a, PyObject *b, int op) |
static int | Matrix_len (MatrixObject *self) |
static PyObject * | Matrix_item_row (MatrixObject *self, int row) |
static PyObject * | Matrix_item_col (MatrixObject *self, int col) |
static int | Matrix_ass_item_row (MatrixObject *self, int row, PyObject *value) |
static int | Matrix_ass_item_col (MatrixObject *self, int col, 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_subscript (MatrixObject *self, PyObject *item) |
static int | Matrix_ass_subscript (MatrixObject *self, PyObject *item, PyObject *value) |
PyDoc_STRVAR (Matrix_translation_doc,"The translation component of the matrix.\n\n:type: Vector") | |
static PyObject * | Matrix_translation_get (MatrixObject *self, void *UNUSED(closure)) |
static int | Matrix_translation_set (MatrixObject *self, PyObject *value, void *UNUSED(closure)) |
PyDoc_STRVAR (Matrix_row_doc,"Access the matix by rows (default), (readonly).\n\n:type: Matrix Access") | |
static PyObject * | Matrix_row_get (MatrixObject *self, void *UNUSED(closure)) |
PyDoc_STRVAR (Matrix_col_doc,"Access the matix by colums, 3x3 and 4x4 only, (readonly).\n\n:type: Matrix Access") | |
static PyObject * | Matrix_col_get (MatrixObject *self, void *UNUSED(closure)) |
PyDoc_STRVAR (Matrix_median_scale_doc,"The average scale applied to each axis (readonly).\n\n:type: float") | |
static PyObject * | Matrix_median_scale_get (MatrixObject *self, void *UNUSED(closure)) |
PyDoc_STRVAR (Matrix_is_negative_doc,"True if this matrix results in a negative scale, 3x3 and 4x4 only, (readonly).\n\n:type: bool") | |
static PyObject * | Matrix_is_negative_get (MatrixObject *self, void *UNUSED(closure)) |
PyDoc_STRVAR (Matrix_is_orthogonal_doc,"True if this matrix is orthogonal, 3x3 and 4x4 only, (readonly).\n\n:type: bool") | |
static PyObject * | Matrix_is_orthogonal_get (MatrixObject *self, void *UNUSED(closure)) |
PyDoc_STRVAR (matrix_doc,"This object gives access to Matrices in Blender.") | |
PyObject * | Matrix_CreatePyObject (float *mat, const unsigned short num_col, const unsigned short num_row, int type, PyTypeObject *base_type) |
PyObject * | Matrix_CreatePyObject_cb (PyObject *cb_user, const unsigned short num_col, const unsigned short num_row, int cb_type, int cb_subtype) |
static int | MatrixAccess_traverse (MatrixAccessObject *self, visitproc visit, void *arg) |
static int | MatrixAccess_clear (MatrixAccessObject *self) |
static void | MatrixAccess_dealloc (MatrixAccessObject *self) |
static int | MatrixAccess_len (MatrixAccessObject *self) |
static PyObject * | MatrixAccess_slice (MatrixAccessObject *self, int begin, int end) |
static PyObject * | MatrixAccess_subscript (MatrixAccessObject *self, PyObject *item) |
static int | MatrixAccess_ass_subscript (MatrixAccessObject *self, PyObject *item, PyObject *value) |
static PyObject * | MatrixAccess_iter (MatrixAccessObject *self) |
Variables | |
int | mathutils_matrix_row_cb_index = -1 |
Mathutils_Callback | mathutils_matrix_row_cb |
int | mathutils_matrix_col_cb_index = -1 |
Mathutils_Callback | mathutils_matrix_col_cb |
int | mathutils_matrix_translation_cb_index = -1 |
Mathutils_Callback | mathutils_matrix_translation_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 |
static PyMappingMethods | MatrixAccess_AsMapping |
PyTypeObject | matrix_access_Type |
Definition in file mathutils_Matrix.c.
typedef enum eMatrixAccess_t eMatrixAccess_t |
enum eMatrixAccess_t |
Definition at line 41 of file mathutils_Matrix.c.
static PyObject* C_Matrix_OrthoProjection | ( | PyObject * | cls, |
PyObject * | args | ||
) | [static] |
Definition at line 638 of file mathutils_Matrix.c.
References mathutils_array_parse(), matrix_3x3_as_4x4(), Matrix_CreatePyObject(), norm(), NULL, Py_NEW, and sqrt().
static PyObject* C_Matrix_Rotation | ( | PyObject * | cls, |
PyObject * | args | ||
) | [static] |
Definition at line 429 of file mathutils_Matrix.c.
References angle(), angle_wrap_rad(), axis_angle_to_mat3(), cosf, mathutils_array_parse(), matrix_3x3_as_4x4(), Matrix_CreatePyObject(), NULL, Py_NEW, sinf, and single_axis_angle_to_mat3().
static PyObject* C_Matrix_Scale | ( | PyObject * | cls, |
PyObject * | args | ||
) | [static] |
Definition at line 547 of file mathutils_Matrix.c.
References mathutils_array_parse(), matrix_3x3_as_4x4(), Matrix_CreatePyObject(), norm(), NULL, Py_NEW, and sqrt().
static PyObject* C_Matrix_Shear | ( | PyObject * | cls, |
PyObject * | args | ||
) | [static] |
Definition at line 760 of file mathutils_Matrix.c.
References mathutils_array_parse(), matrix_3x3_as_4x4(), Matrix_CreatePyObject(), NULL, and Py_NEW.
static PyObject* C_Matrix_Translation | ( | PyObject * | cls, |
PyObject * | value | ||
) | [static] |
Definition at line 522 of file mathutils_Matrix.c.
References MAT4_UNITY, mathutils_array_parse(), Matrix_CreatePyObject(), NULL, and Py_NEW.
static int mathutils_matrix_col_check | ( | BaseMathObject * | bmo | ) | [static] |
Definition at line 167 of file mathutils_Matrix.c.
References BaseMath_ReadCallback.
static int mathutils_matrix_col_get | ( | BaseMathObject * | bmo, |
int | col | ||
) | [static] |
Definition at line 173 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, if(), matrix_col_vector_check(), MATRIX_ITEM, and MIN2.
static int mathutils_matrix_col_get_index | ( | BaseMathObject * | bmo, |
int | col, | ||
int | row | ||
) | [static] |
Definition at line 216 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, if(), matrix_col_vector_check(), and MATRIX_ITEM.
static int mathutils_matrix_col_set | ( | BaseMathObject * | bmo, |
int | col | ||
) | [static] |
Definition at line 194 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, if(), matrix_col_vector_check(), MATRIX_ITEM, and MIN2.
static int mathutils_matrix_col_set_index | ( | BaseMathObject * | bmo, |
int | col, | ||
int | row | ||
) | [static] |
Definition at line 229 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, if(), matrix_col_vector_check(), and MATRIX_ITEM.
static int mathutils_matrix_row_check | ( | BaseMathObject * | bmo | ) | [static] |
Definition at line 83 of file mathutils_Matrix.c.
References BaseMath_ReadCallback.
static int mathutils_matrix_row_get | ( | BaseMathObject * | bmo, |
int | row | ||
) | [static] |
Definition at line 89 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, if(), MATRIX_ITEM, and matrix_row_vector_check().
static int mathutils_matrix_row_get_index | ( | BaseMathObject * | bmo, |
int | row, | ||
int | col | ||
) | [static] |
Definition at line 124 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, if(), MATRIX_ITEM, and matrix_row_vector_check().
static int mathutils_matrix_row_set | ( | BaseMathObject * | bmo, |
int | row | ||
) | [static] |
Definition at line 106 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, if(), MATRIX_ITEM, and matrix_row_vector_check().
static int mathutils_matrix_row_set_index | ( | BaseMathObject * | bmo, |
int | row, | ||
int | col | ||
) | [static] |
Definition at line 137 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, if(), MATRIX_ITEM, and matrix_row_vector_check().
static int mathutils_matrix_translation_check | ( | BaseMathObject * | bmo | ) | [static] |
Definition at line 260 of file mathutils_Matrix.c.
References BaseMath_ReadCallback.
static int mathutils_matrix_translation_get | ( | BaseMathObject * | bmo, |
int | col | ||
) | [static] |
Definition at line 266 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, if(), and MATRIX_ITEM.
static int mathutils_matrix_translation_get_index | ( | BaseMathObject * | bmo, |
int | col, | ||
int | row | ||
) | [static] |
Definition at line 297 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, if(), and MATRIX_ITEM.
static int mathutils_matrix_translation_set | ( | BaseMathObject * | bmo, |
int | col | ||
) | [static] |
Definition at line 281 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, if(), and MATRIX_ITEM.
static int mathutils_matrix_translation_set_index | ( | BaseMathObject * | bmo, |
int | col, | ||
int | row | ||
) | [static] |
Definition at line 308 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, if(), and MATRIX_ITEM.
static void matrix_3x3_as_4x4 | ( | float | mat[16] | ) | [static] |
Definition at line 399 of file mathutils_Matrix.c.
Referenced by C_Matrix_OrthoProjection(), C_Matrix_Rotation(), C_Matrix_Scale(), and C_Matrix_Shear().
static PyObject * matrix__apply_to_copy | ( | PyNoArgsFunction | matrix_func, |
MatrixObject * | self | ||
) | [static] |
Definition at line 384 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] |
Definition at line 1783 of file mathutils_Matrix.c.
References add_vn_vnvn(), BaseMath_ReadCallback, Matrix_CreatePyObject(), MatrixObject_Check, NULL, MatrixObject::num_col, MatrixObject::num_row, and Py_NEW.
void matrix_as_3x3 | ( | float | mat[3][3], |
MatrixObject * | self | ||
) |
Definition at line 847 of file mathutils_Matrix.c.
References copy_v3_v3(), and MATRIX_COL_PTR.
Referenced by mathutils_any_to_rotmat(), Matrix_median_scale_get(), Matrix_rotate(), Matrix_to_3x3(), and Matrix_to_scale().
static int Matrix_ass_item_col | ( | MatrixObject * | self, |
int | col, | ||
PyObject * | value | ||
) | [static] |
Definition at line 1671 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, mathutils_array_parse(), and MATRIX_ITEM.
Referenced by MatrixAccess_ass_subscript().
static int Matrix_ass_item_row | ( | MatrixObject * | self, |
int | row, | ||
PyObject * | value | ||
) | [static] |
Definition at line 1646 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, mathutils_array_parse(), and MATRIX_ITEM.
Referenced by Matrix_ass_subscript(), and MatrixAccess_ass_subscript().
static int Matrix_ass_slice | ( | MatrixObject * | self, |
int | begin, | ||
int | end, | ||
PyObject * | value | ||
) | [static] |
Definition at line 1724 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, CLAMP(), mathutils_array_parse(), MIN2, NULL, and size().
Referenced by Matrix_ass_subscript(), and Matrix_new().
static int Matrix_ass_subscript | ( | MatrixObject * | self, |
PyObject * | item, | ||
PyObject * | value | ||
) | [static] |
Definition at line 1995 of file mathutils_Matrix.c.
References i, Matrix_ass_item_row(), Matrix_ass_slice(), and step().
static PyObject* Matrix_col_get | ( | MatrixObject * | self, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 2131 of file mathutils_Matrix.c.
References MAT_ACCESS_COL, and MatrixAccess_CreatePyObject().
static int matrix_col_vector_check | ( | MatrixObject * | mat, |
VectorObject * | vec, | ||
int | col | ||
) | [static] |
Definition at line 64 of file mathutils_Matrix.c.
References MatrixObject::num_col, MatrixObject::num_row, and VectorObject::size.
Referenced by mathutils_matrix_col_get(), mathutils_matrix_col_get_index(), mathutils_matrix_col_set(), and mathutils_matrix_col_set_index().
static PyObject * Matrix_copy | ( | MatrixObject * | self | ) | [static] |
Definition at line 1488 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_CreatePyObject(), NULL, and Py_NEW.
Referenced by matrix__apply_to_copy().
PyObject* Matrix_CreatePyObject | ( | float * | mat, |
const unsigned short | num_col, | ||
const unsigned short | num_row, | ||
int | type, | ||
PyTypeObject * | base_type | ||
) |
Definition at line 2314 of file mathutils_Matrix.c.
References Matrix_identity(), NULL, Py_NEW, and Py_WRAP.
Referenced by C_Matrix_OrthoProjection(), C_Matrix_Rotation(), C_Matrix_Scale(), C_Matrix_Shear(), C_Matrix_Translation(), Euler_to_matrix(), Matrix_add(), Matrix_copy(), Matrix_CreatePyObject_cb(), Matrix_lerp(), Matrix_mul(), matrix_mul_float(), Matrix_new(), Matrix_sub(), Matrix_to_3x3(), Matrix_to_4x4(), pyrna_math_object_from_array(), pyrna_param_to_py(), and Quaternion_to_matrix().
PyObject* Matrix_CreatePyObject_cb | ( | PyObject * | cb_user, |
const unsigned short | num_col, | ||
const unsigned short | num_row, | ||
int | cb_type, | ||
int | cb_subtype | ||
) |
Definition at line 2374 of file mathutils_Matrix.c.
References Matrix_CreatePyObject(), and Py_NEW.
Referenced by pyrna_math_object_from_array().
static PyObject* Matrix_decompose | ( | MatrixObject * | self | ) | [static] |
Definition at line 1267 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_quat(), mat4_to_loc_rot_size(), NULL, Py_NEW, Quaternion_CreatePyObject(), rot, size(), and Vector_CreatePyObject().
static PyObject* Matrix_determinant | ( | MatrixObject * | self | ) | [static] |
Definition at line 1356 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, matrix_determinant_internal(), and NULL.
static float matrix_determinant_internal | ( | MatrixObject * | self | ) | [static] |
Definition at line 855 of file mathutils_Matrix.c.
References determinant_m2(), determinant_m3(), determinant_m4(), and MATRIX_ITEM.
Referenced by Matrix_determinant(), and Matrix_invert().
static PyObject* Matrix_identity | ( | MatrixObject * | self | ) | [static] |
Definition at line 1448 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, MATRIX_ITEM, NULL, unit_m3(), and unit_m4().
Referenced by Matrix_CreatePyObject().
static PyObject* Matrix_invert | ( | MatrixObject * | self | ) | [static] |
Definition at line 1145 of file mathutils_Matrix.c.
References adjoint_m3_m3(), adjoint_m4_m4(), BaseMath_ReadCallback, BaseMath_WriteCallback, matrix_determinant_internal(), MATRIX_ITEM, and NULL.
Referenced by Matrix_inverted().
static PyObject* Matrix_inverted | ( | MatrixObject * | self | ) | [static] |
Definition at line 1217 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 2162 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] |
Definition at line 2183 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, is_orthogonal_m3(), is_orthogonal_m4(), and NULL.
static PyObject* Matrix_item_col | ( | MatrixObject * | self, |
int | col | ||
) | [static] |
Definition at line 1629 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mathutils_matrix_col_cb_index, NULL, and Vector_CreatePyObject_cb().
Referenced by MatrixAccess_slice(), and MatrixAccess_subscript().
static PyObject* Matrix_item_row | ( | MatrixObject * | self, |
int | row | ||
) | [static] |
Definition at line 1615 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mathutils_matrix_row_cb_index, NULL, and Vector_CreatePyObject_cb().
Referenced by Matrix_subscript(), MatrixAccess_slice(), and MatrixAccess_subscript().
static int Matrix_len | ( | MatrixObject * | self | ) | [static] |
Definition at line 1608 of file mathutils_Matrix.c.
static PyObject* Matrix_lerp | ( | MatrixObject * | self, |
PyObject * | args | ||
) | [static] |
Definition at line 1310 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, blend_m3_m3m3(), blend_m4_m4m4(), Matrix_CreatePyObject(), MATRIX_MAX_DIM, matrix_Type, NULL, MatrixObject::num_col, MatrixObject::num_row, and Py_NEW.
static PyObject* Matrix_median_scale_get | ( | MatrixObject * | self, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 2139 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] |
Definition at line 1855 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BLI_assert, column_vector_multiplication(), dot(), Matrix_CreatePyObject(), MATRIX_ITEM, matrix_mul_float(), MatrixObject_Check, NULL, MatrixObject::num_col, MatrixObject::num_row, Py_NEW, VectorObject::size, Vector_CreatePyObject(), and VectorObject_Check.
static PyObject* matrix_mul_float | ( | MatrixObject * | mat, |
const float | scalar | ||
) | [static] |
Definition at line 1848 of file mathutils_Matrix.c.
References Matrix_CreatePyObject(), mul_vn_vn_fl(), MatrixObject::num_col, MatrixObject::num_row, and Py_NEW.
Referenced by Matrix_mul().
static PyObject* Matrix_new | ( | PyTypeObject * | type, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Definition at line 335 of file mathutils_Matrix.c.
References Matrix_ass_slice(), Matrix_CreatePyObject(), NULL, and Py_NEW.
static PyObject* Matrix_repr | ( | MatrixObject * | self | ) | [static] |
Definition at line 1498 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, MATRIX_ITEM, MATRIX_MAX_DIM, and NULL.
static PyObject* Matrix_resize_4x4 | ( | MatrixObject * | self | ) | [static] |
Definition at line 984 of file mathutils_Matrix.c.
References copy_m4_m4(), MAT4_UNITY, MATRIX_COL_PTR, NULL, and Py_WRAP.
static PyObject* Matrix_richcmpr | ( | PyObject * | a, |
PyObject * | b, | ||
int | op | ||
) | [static] |
Definition at line 1566 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, EXPP_VectorsAreEqual(), MatrixObject_Check, NULL, MatrixObject::num_col, and MatrixObject::num_row.
static PyObject* Matrix_rotate | ( | MatrixObject * | self, |
PyObject * | value | ||
) | [static] |
Definition at line 1232 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, copy_m3_m3(), mathutils_any_to_rotmat(), matrix_as_3x3(), mul_m3_m3m3(), and NULL.
static PyObject* Matrix_row_get | ( | MatrixObject * | self, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 2123 of file mathutils_Matrix.c.
References MAT_ACCESS_ROW, and MatrixAccess_CreatePyObject().
static int matrix_row_vector_check | ( | MatrixObject * | mat, |
VectorObject * | vec, | ||
int | row | ||
) | [static] |
Definition at line 51 of file mathutils_Matrix.c.
References MatrixObject::num_col, MatrixObject::num_row, and VectorObject::size.
Referenced by mathutils_matrix_row_get(), mathutils_matrix_row_get_index(), mathutils_matrix_row_set(), and mathutils_matrix_row_set_index().
static PyObject* Matrix_slice | ( | MatrixObject * | self, |
int | begin, | ||
int | end | ||
) | [static] |
Definition at line 1700 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, CLAMP(), mathutils_matrix_row_cb_index, MIN2, NULL, and Vector_CreatePyObject_cb().
Referenced by Matrix_subscript().
static PyObject* Matrix_str | ( | MatrixObject * | self | ) | [static] |
Definition at line 1530 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_dynstr_new(), BLI_snprintf(), mathutils_dynstr_to_py(), MATRIX_ITEM, MATRIX_MAX_DIM, MAX2, NULL, and size().
static PyObject* Matrix_sub | ( | PyObject * | m1, |
PyObject * | m2 | ||
) | [static] |
Definition at line 1815 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_CreatePyObject(), MatrixObject_Check, NULL, MatrixObject::num_col, MatrixObject::num_row, Py_NEW, and sub_vn_vnvn().
static PyObject* Matrix_subscript | ( | MatrixObject * | self, |
PyObject * | item | ||
) | [static] |
Definition at line 1958 of file mathutils_Matrix.c.
References i, Matrix_item_row(), Matrix_slice(), NULL, and step().
static PyObject* Matrix_to_3x3 | ( | MatrixObject * | self | ) | [static] |
Definition at line 1059 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, matrix_as_3x3(), Matrix_CreatePyObject(), NULL, and Py_NEW.
static PyObject* Matrix_to_4x4 | ( | MatrixObject * | self | ) | [static] |
Definition at line 1030 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, copy_m4_m3(), Matrix_CreatePyObject(), NULL, and Py_NEW.
static PyObject* Matrix_to_euler | ( | MatrixObject * | self, |
PyObject * | args | ||
) | [static] |
Definition at line 922 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, copy_m3_m4(), copy_v3_v3(), Euler_CreatePyObject(), euler_order_from_string(), EULER_ORDER_XYZ, euler_Type, mat3_to_compatible_eul(), mat3_to_compatible_eulO(), mat3_to_eul(), mat3_to_eulO(), NULL, and Py_NEW.
static PyObject* Matrix_to_quaternion | ( | MatrixObject * | self | ) | [static] |
Definition at line 881 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_quat(), mat4_to_quat(), NULL, Py_NEW, and Quaternion_CreatePyObject().
static PyObject* Matrix_to_scale | ( | MatrixObject * | self | ) | [static] |
Definition at line 1110 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_rot_size(), matrix_as_3x3(), NULL, Py_NEW, rot, size(), and Vector_CreatePyObject().
static PyObject* Matrix_to_translation | ( | MatrixObject * | self | ) | [static] |
Definition at line 1085 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, MATRIX_COL_PTR, NULL, Py_NEW, and Vector_CreatePyObject().
static PyObject* Matrix_translation_get | ( | MatrixObject * | self, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 2074 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mathutils_matrix_translation_cb_index, NULL, and Vector_CreatePyObject_cb().
static int Matrix_translation_set | ( | MatrixObject * | self, |
PyObject * | value, | ||
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 2094 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, copy_v3_v3(), and mathutils_array_parse().
static PyObject* Matrix_transpose | ( | MatrixObject * | self | ) | [static] |
Definition at line 1378 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, MATRIX_ITEM, NULL, transpose_m3(), and transpose_m4().
Referenced by Matrix_transposed().
static PyObject* Matrix_transposed | ( | MatrixObject * | self | ) | [static] |
Definition at line 1414 of file mathutils_Matrix.c.
References matrix__apply_to_copy(), and Matrix_transpose().
static PyObject* Matrix_zero | ( | MatrixObject * | self | ) | [static] |
Definition at line 1428 of file mathutils_Matrix.c.
References BaseMath_WriteCallback, fill_vn_fl(), and NULL.
static int MatrixAccess_ass_subscript | ( | MatrixAccessObject * | self, |
PyObject * | item, | ||
PyObject * | value | ||
) | [static] |
Definition at line 2508 of file mathutils_Matrix.c.
References i, MAT_ACCESS_ROW, Matrix_ass_item_col(), Matrix_ass_item_row(), MatrixObject::num_col, and MatrixObject::num_row.
static int MatrixAccess_clear | ( | MatrixAccessObject * | self | ) | [static] |
Definition at line 2405 of file mathutils_Matrix.c.
Referenced by MatrixAccess_dealloc().
static PyObject * MatrixAccess_CreatePyObject | ( | MatrixObject * | matrix, |
const eMatrixAccess_t | type | ||
) | [static] |
Definition at line 2590 of file mathutils_Matrix.c.
References MatrixAccessObject::matrix_user, and MatrixAccessObject::type.
Referenced by Matrix_col_get(), and Matrix_row_get().
static void MatrixAccess_dealloc | ( | MatrixAccessObject * | self | ) | [static] |
Definition at line 2411 of file mathutils_Matrix.c.
References MatrixAccess_clear().
static PyObject* MatrixAccess_iter | ( | MatrixAccessObject * | self | ) | [static] |
Definition at line 2538 of file mathutils_Matrix.c.
References MATRIX_MAX_DIM, MatrixAccess_slice(), and NULL.
static int MatrixAccess_len | ( | MatrixAccessObject * | self | ) | [static] |
Definition at line 2423 of file mathutils_Matrix.c.
References MAT_ACCESS_ROW.
Referenced by MatrixAccess_subscript().
static PyObject* MatrixAccess_slice | ( | MatrixAccessObject * | self, |
int | begin, | ||
int | end | ||
) | [static] |
Definition at line 2430 of file mathutils_Matrix.c.
References CLAMP(), MAT_ACCESS_ROW, Matrix_item_col(), Matrix_item_row(), MIN2, MatrixObject::num_col, and MatrixObject::num_row.
Referenced by MatrixAccess_iter(), and MatrixAccess_subscript().
static PyObject* MatrixAccess_subscript | ( | MatrixAccessObject * | self, |
PyObject * | item | ||
) | [static] |
Definition at line 2462 of file mathutils_Matrix.c.
References i, MAT_ACCESS_ROW, Matrix_item_col(), Matrix_item_row(), MatrixAccess_len(), MatrixAccess_slice(), NULL, MatrixObject::num_col, MatrixObject::num_row, and step().
static int MatrixAccess_traverse | ( | MatrixAccessObject * | self, |
visitproc | visit, | ||
void * | arg | ||
) | [static] |
Definition at line 2399 of file mathutils_Matrix.c.
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_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_row_doc | , |
"Access the matix by rows | default, | ||
(readonly).\n\n:type:Matrix Access" | |||
) |
PyDoc_STRVAR | ( | Matrix_is_negative_doc | , |
"True if this matrix results in a negative | scale, | ||
3x3 and 4x4 | only, | ||
(readonly).\n\n:type:bool" | |||
) |
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 | ( | 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_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_lerp_doc | , |
".. function:: lerp(other, factor)\n""\n"" Returns the interpolation of two matrices.\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_is_orthogonal_doc | , |
"True if this matrix is | orthogonal, | ||
3x3 and 4x4 | only, | ||
(readonly).\n\n:type:bool" | |||
) |
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 | ( | 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 | ( | 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_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_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 | ( | 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 | ( | Matrix_col_doc | , |
"Access the matix by | colums, | ||
3x3 and 4x4 | only, | ||
(readonly).\n\n:type:Matrix Access" | |||
) |
PyDoc_STRVAR | ( | Matrix_translation_doc | , |
"The translation component of the matrix.\n\n:type: Vector" | |||
) |
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_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_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_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_doc | , |
"This object gives access to Matrices in Blender." | |||
) |
PyDoc_STRVAR | ( | Matrix_resize_4x4_doc | , |
".. method:: resize_4x4()\n""\n"" Resize the matrix to 4x4.\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_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_median_scale_doc | , |
"The average scale applied to each axis (readonly).\n\n:type: float" | |||
) |
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 | ( | 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 | ( | 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_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" | |||
) |
{ mathutils_matrix_col_check, mathutils_matrix_col_get, mathutils_matrix_col_set, mathutils_matrix_col_get_index, mathutils_matrix_col_set_index }
Definition at line 244 of file mathutils_Matrix.c.
Referenced by PyInit_mathutils().
int mathutils_matrix_col_cb_index = -1 |
Definition at line 165 of file mathutils_Matrix.c.
Referenced by Matrix_item_col(), and PyInit_mathutils().
{ mathutils_matrix_row_check, mathutils_matrix_row_get, mathutils_matrix_row_set, mathutils_matrix_row_get_index, mathutils_matrix_row_set_index }
Definition at line 152 of file mathutils_Matrix.c.
Referenced by PyInit_mathutils().
int mathutils_matrix_row_cb_index = -1 |
Definition at line 81 of file mathutils_Matrix.c.
Referenced by Matrix_item_row(), Matrix_slice(), and PyInit_mathutils().
{ mathutils_matrix_translation_check, mathutils_matrix_translation_get, mathutils_matrix_translation_set, mathutils_matrix_translation_get_index, mathutils_matrix_translation_set_index }
Definition at line 321 of file mathutils_Matrix.c.
Referenced by PyInit_mathutils().
Definition at line 258 of file mathutils_Matrix.c.
Referenced by Matrix_translation_get(), and PyInit_mathutils().
PyTypeObject matrix_access_Type |
{ PyVarObject_HEAD_INIT(NULL, 0) "MatrixAccess", sizeof(MatrixAccessObject), 0, (destructor)MatrixAccess_dealloc, NULL, NULL, NULL, NULL, NULL, NULL, NULL , &MatrixAccess_AsMapping, NULL, NULL, NULL, NULL, NULL, NULL, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, NULL, (traverseproc)MatrixAccess_traverse, (inquiry)MatrixAccess_clear, NULL , 0, (getiterfunc)MatrixAccess_iter, }
Definition at line 2561 of file mathutils_Matrix.c.
Referenced by PyInit_mathutils().
PyMappingMethods Matrix_AsMapping [static] |
{ (lenfunc)Matrix_len, (binaryfunc)Matrix_subscript, (objobjargproc)Matrix_ass_subscript }
Definition at line 2027 of file mathutils_Matrix.c.
PyGetSetDef Matrix_getseters[] [static] |
{ {(char *)"median_scale", (getter)Matrix_median_scale_get, (setter)NULL, Matrix_median_scale_doc, NULL}, {(char *)"translation", (getter)Matrix_translation_get, (setter)Matrix_translation_set, Matrix_translation_doc, NULL}, {(char *)"row", (getter)Matrix_row_get, (setter)NULL, Matrix_row_doc, NULL}, {(char *)"col", (getter)Matrix_col_get, (setter)NULL, Matrix_col_doc, NULL}, {(char *)"is_negative", (getter)Matrix_is_negative_get, (setter)NULL, Matrix_is_negative_doc, NULL}, {(char *)"is_orthogonal", (getter)Matrix_is_orthogonal_get, (setter)NULL, Matrix_is_orthogonal_doc, NULL}, {(char *)"is_wrapped", (getter)BaseMathObject_is_wrapped_get, (setter)NULL, BaseMathObject_is_wrapped_doc, NULL}, {(char *)"owner",(getter)BaseMathObject_owner_get, (setter)NULL, BaseMathObject_owner_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} }
Definition at line 2204 of file mathutils_Matrix.c.
struct PyMethodDef Matrix_methods[] [static] |
Definition at line 2217 of file mathutils_Matrix.c.
PyNumberMethods Matrix_NumMethods [static] |
Definition at line 2034 of file mathutils_Matrix.c.
PySequenceMethods Matrix_SeqMethods [static] |
{ (lenfunc) Matrix_len, (binaryfunc) NULL, (ssizeargfunc) NULL, (ssizeargfunc) Matrix_item_row, (ssizessizeargfunc) NULL, (ssizeobjargproc) Matrix_ass_item_row, (ssizessizeobjargproc) NULL, (objobjproc) NULL, (binaryfunc) NULL, (ssizeargfunc) NULL, }
Definition at line 1944 of file mathutils_Matrix.c.
PyTypeObject matrix_Type |
Definition at line 2261 of file mathutils_Matrix.c.
Referenced by Matrix_lerp(), and PyInit_mathutils().
PyMappingMethods MatrixAccess_AsMapping [static] |
{ (lenfunc)MatrixAccess_len, (binaryfunc)MatrixAccess_subscript, (objobjargproc) MatrixAccess_ass_subscript }
Definition at line 2555 of file mathutils_Matrix.c.