|
Blender
V2.59
|
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 |
| static PyObject* C_Matrix_OrthoProjection | ( | PyObject * | cls, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 440 of file mathutils_Matrix.c.
References mathutils_array_parse(), matrix_3x3_as_4x4(), newMatrixObject(), norm(), NULL, Py_NEW, and sqrt().
| static PyObject* C_Matrix_Rotation | ( | PyObject * | cls, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 208 of file mathutils_Matrix.c.
References angle(), angle_wrap_rad(), axis_angle_to_mat3(), cos(), mathutils_array_parse(), matrix_3x3_as_4x4(), newMatrixObject(), NULL, Py_NEW, and sin().
| static PyObject* C_Matrix_Scale | ( | PyObject * | cls, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 353 of file mathutils_Matrix.c.
References mathutils_array_parse(), matrix_3x3_as_4x4(), newMatrixObject(), norm(), NULL, Py_NEW, and sqrt().
| static PyObject* C_Matrix_Shear | ( | PyObject * | cls, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 558 of file mathutils_Matrix.c.
References mathutils_array_parse(), matrix_3x3_as_4x4(), newMatrixObject(), NULL, and Py_NEW.
| static PyObject* C_Matrix_Translation | ( | PyObject * | cls, |
| PyObject * | value | ||
| ) | [static] |
Definition at line 325 of file mathutils_Matrix.c.
References copy_v3_v3(), mathutils_array_parse(), newMatrixObject(), NULL, Py_NEW, and unit_m4().
| 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] |
Definition at line 178 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 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] |
Definition at line 1501 of file mathutils_Matrix.c.
References add_vn_vnvn(), BaseMath_ReadCallback, MatrixObject::col_size, MatrixObject_Check, newMatrixObject(), NULL, Py_NEW, and MatrixObject::row_size.
| void matrix_as_3x3 | ( | float | mat[3][3], |
| MatrixObject * | self | ||
| ) |
Definition at line 643 of file mathutils_Matrix.c.
References copy_v3_v3().
Referenced by mathutils_any_to_rotmat(), Matrix_median_scale_get(), Matrix_rotate(), Matrix_to_3x3(), and Matrix_to_scale().
| static int Matrix_ass_item | ( | MatrixObject * | self, |
| int | i, | ||
| PyObject * | value | ||
| ) | [static] |
Definition at line 1403 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, and mathutils_array_parse().
Referenced by Matrix_ass_subscript().
| static int Matrix_ass_slice | ( | MatrixObject * | self, |
| int | begin, | ||
| int | end, | ||
| PyObject * | value | ||
| ) | [static] |
Definition at line 1451 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, CLAMP(), i, 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 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] |
Definition at line 1075 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_quat(), mat4_to_loc_rot_size(), newQuaternionObject(), newVectorObject(), NULL, Py_NEW, and size().
| 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] |
Definition at line 959 of file mathutils_Matrix.c.
References adjoint_m3_m3(), adjoint_m4_m4(), BaseMath_ReadCallback, BaseMath_WriteCallback, matrix_determinant_internal(), and NULL.
Referenced by Matrix_inv(), and Matrix_inverted().
| 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] |
Definition at line 1825 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, is_orthogonal_m3(), is_orthogonal_m4(), and NULL.
| static PyObject* Matrix_item | ( | MatrixObject * | self, |
| int | i | ||
| ) | [static] |
Definition at line 1387 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mathutils_matrix_vector_cb_index, newVectorObject_cb(), and NULL.
Referenced by Matrix_subscript().
| 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] |
Definition at line 1118 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, blend_m3_m3m3(), blend_m4_m4m4(), MatrixObject::col_size, MATRIX_MAX_DIM, matrix_Type, newMatrixObject(), NULL, Py_NEW, and MatrixObject::row_size.
| 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] |
Definition at line 1570 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BLI_assert, MatrixObject::col_size, column_vector_multiplication(), dot(), MatrixObject::matrix, matrix_mul_float(), MatrixObject_Check, newMatrixObject(), newVectorObject(), NULL, Py_NEW, MatrixObject::row_size, VectorObject::size, and VectorObject_Check.
| static PyObject* matrix_mul_float | ( | MatrixObject * | mat, |
| const float | scalar | ||
| ) | [static] |
Definition at line 1563 of file mathutils_Matrix.c.
References MatrixObject::col_size, mul_vn_vn_fl(), newMatrixObject(), Py_NEW, and MatrixObject::row_size.
Referenced by Matrix_mul().
| 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.
| static PyObject* Matrix_richcmpr | ( | PyObject * | a, |
| PyObject * | b, | ||
| int | op | ||
| ) | [static] |
Definition at line 1338 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, MatrixObject::col_size, EXPP_VectorsAreEqual(), MatrixObject_Check, NULL, and MatrixObject::row_size.
| static PyObject* Matrix_rotate | ( | MatrixObject * | self, |
| PyObject * | value | ||
| ) | [static] |
Definition at line 1041 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_slice | ( | MatrixObject * | self, |
| int | begin, | ||
| int | end | ||
| ) | [static] |
Definition at line 1427 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, CLAMP(), mathutils_matrix_vector_cb_index, MIN2, newVectorObject_cb(), and NULL.
Referenced by Matrix_subscript().
| static PyObject* Matrix_sub | ( | PyObject * | m1, |
| PyObject * | m2 | ||
| ) | [static] |
Definition at line 1532 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, MatrixObject::col_size, MatrixObject_Check, newMatrixObject(), NULL, Py_NEW, MatrixObject::row_size, and sub_vn_vnvn().
| 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] |
Definition at line 720 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, copy_m3_m4(), copy_v3_v3(), euler_order_from_string(), EULER_ORDER_XYZ, euler_Type, mat3_to_compatible_eul(), mat3_to_compatible_eulO(), mat3_to_eul(), mat3_to_eulO(), newEulerObject(), NULL, and Py_NEW.
| static PyObject* Matrix_to_quaternion | ( | MatrixObject * | self | ) | [static] |
Definition at line 679 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_quat(), mat4_to_quat(), newQuaternionObject(), NULL, and Py_NEW.
| static PyObject* Matrix_to_scale | ( | MatrixObject * | self | ) | [static] |
Definition at line 924 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_rot_size(), matrix_as_3x3(), newVectorObject(), NULL, Py_NEW, and size().
| 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] |
Definition at line 1186 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, NULL, transpose_m3(), and transpose_m4().
Referenced by Matrix_transposed().
| 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 | ||
| ) |
Definition at line 1967 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_lerp(), Matrix_mul(), matrix_mul_float(), Matrix_new(), Matrix_sub(), Matrix_to_3x3(), Matrix_to_4x4(), newMatrixObject_cb(), pyrna_math_object_from_array(), pyrna_param_to_py(), and Quaternion_to_matrix().
| 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." | |||
| ) |
{
mathutils_matrix_vector_check,
mathutils_matrix_vector_get,
mathutils_matrix_vector_set,
mathutils_matrix_vector_get_index,
mathutils_matrix_vector_set_index
}
Definition at line 106 of file mathutils_Matrix.c.
Referenced by PyInit_mathutils().
| int mathutils_matrix_vector_cb_index = -1 |
Definition at line 45 of file mathutils_Matrix.c.
Referenced by Matrix_item(), Matrix_slice(), and PyInit_mathutils().
PyMappingMethods Matrix_AsMapping [static] |
{
(lenfunc)Matrix_len,
(binaryfunc)Matrix_subscript,
(objobjargproc)Matrix_ass_subscript
}
Definition at line 1733 of file mathutils_Matrix.c.
PyGetSetDef Matrix_getseters[] [static] |
{
{(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] |
{
(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().