|
Blender
V2.93
|
#include <Python.h>#include "mathutils.h"#include "BLI_math.h"#include "BLI_utildefines.h"#include "../generic/py_capi_utils.h"#include "../generic/python_utildefines.h"#include "BLI_dynstr.h"#include "BLI_string.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_notest (MatrixObject *self, const float *matrix) |
| static PyObject * | Matrix_copy (MatrixObject *self) |
| static PyObject * | Matrix_deepcopy (MatrixObject *self, PyObject *args) |
| static int | Matrix_ass_slice (MatrixObject *self, int begin, int end, PyObject *value) |
| static PyObject * | matrix__apply_to_copy (PyObject *(*matrix_func)(MatrixObject *), 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_Identity_doc, ".. classmethod:: Identity(size)\n" "\n" " Create an identity matrix.\n" "\n" " :arg size: The size of the identity matrix to construct [2, 4].\n" " :type size: int\n" " :return: A new identity matrix.\n" " :rtype: :class:`Matrix`\n") | |
| static PyObject * | C_Matrix_Identity (PyObject *cls, PyObject *args) |
| 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_Diagonal_doc, ".. classmethod:: Diagonal(vector)\n" "\n" " Create a diagonal (scaling) matrix using the values from the vector.\n" "\n" " :arg vector: The vector of values for the diagonal.\n" " :type vector: :class:`Vector`\n" " :return: A diagonal matrix.\n" " :rtype: :class:`Matrix`\n") | |
| static PyObject * | C_Matrix_Diagonal (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 corresponding 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 void | matrix_copy (MatrixObject *mat_dst, const MatrixObject *mat_src) |
| static void | matrix_unit_internal (MatrixObject *self) |
| static void | matrix_transpose_internal (float mat_dst_fl[], const MatrixObject *mat_src) |
| static float | matrix_determinant_internal (const MatrixObject *self) |
| static void | adjoint_matrix_n (float *mat_dst, const float *mat_src, const ushort dim) |
| static void | matrix_invert_with_det_n_internal (float *mat_dst, const float *mat_src, const float det, const ushort dim) |
| static bool | matrix_invert_internal (const MatrixObject *self, float *r_mat) |
| static void | matrix_invert_safe_internal (const MatrixObject *self, float *r_mat) |
| 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) |
| static PyObject * | Matrix_to_NxN (MatrixObject *self, const int num_col, const int num_row) |
| PyDoc_STRVAR (Matrix_to_2x2_doc, ".. method:: to_2x2()\n" "\n" " Return a 2x2 copy of this matrix.\n" "\n" " :return: a new matrix.\n" " :rtype: :class:`Matrix`\n") | |
| static PyObject * | Matrix_to_2x2 (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_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_translation_doc, ".. method:: to_translation()\n" "\n" " Return the translation part of a 4 row matrix.\n" "\n" " :return: Return 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 the scale part of a 3x3 or 4x4 matrix.\n" "\n" " :return: Return the scale of a matrix.\n" " :rtype: :class:`Vector`\n" "\n" " .. note:: This method does not return a negative 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) |
| static bool | matrix_invert_is_compat (const MatrixObject *self) |
| static bool | matrix_invert_args_check (const MatrixObject *self, PyObject *args, bool check_type) |
| static void | matrix_invert_raise_degenerate (void) |
| PyDoc_STRVAR (Matrix_invert_doc, ".. method:: invert(fallback=None)\n" "\n" " Set the matrix to its inverse.\n" "\n" " :arg fallback: Set the matrix to this value when the inverse cannot be calculated\n" " (instead of raising a :exc:`ValueError` exception).\n" " :type fallback: :class:`Matrix`\n" "\n" " .. seealso:: `Inverse matrix <https://en.wikipedia.org/wiki/Inverse_matrix>`__ on " "Wikipedia.\n") | |
| static PyObject * | Matrix_invert (MatrixObject *self, PyObject *args) |
| PyDoc_STRVAR (Matrix_inverted_doc, ".. method:: inverted(fallback=None)\n" "\n" " Return an inverted copy of the matrix.\n" "\n" " :arg fallback: return this when the inverse can't be calculated\n" " (instead of raising a :exc:`ValueError`).\n" " :type fallback: any\n" " :return: the inverted matrix or fallback when given.\n" " :rtype: :class:`Matrix`\n") | |
| static PyObject * | Matrix_inverted (MatrixObject *self, PyObject *args) |
| static PyObject * | Matrix_inverted_noargs (MatrixObject *self) |
| PyDoc_STRVAR (Matrix_invert_safe_doc, ".. method:: invert_safe()\n" "\n" " Set the matrix to its inverse, will never error.\n" " If degenerated (e.g. zero scale on an axis), add some epsilon to its diagonal, " "to get an invertible one.\n" " If tweaked matrix is still degenerated, set to the identity matrix instead.\n" "\n" " .. seealso:: `Inverse Matrix <https://en.wikipedia.org/wiki/Inverse_matrix>`__ on " "Wikipedia.\n") | |
| static PyObject * | Matrix_invert_safe (MatrixObject *self) |
| PyDoc_STRVAR (Matrix_inverted_safe_doc, ".. method:: inverted_safe()\n" "\n" " Return an inverted copy of the matrix, will never error.\n" " If degenerated (e.g. zero scale on an axis), add some epsilon to its diagonal, " "to get an invertible one.\n" " If tweaked matrix is still degenerated, return the identity matrix instead.\n" "\n" " :return: the inverted matrix.\n" " :rtype: :class:`Matrix`\n") | |
| static PyObject * | Matrix_inverted_safe (MatrixObject *self) |
| PyDoc_STRVAR (Matrix_adjugate_doc, ".. method:: adjugate()\n" "\n" " Set the matrix to its adjugate.\n" "\n" " :raises ValueError: if the matrix cannot be adjugate.\n" "\n" " .. seealso:: `Adjugate matrix <https://en.wikipedia.org/wiki/Adjugate_matrix>`__ on " "Wikipedia.\n") | |
| static PyObject * | Matrix_adjugate (MatrixObject *self) |
| PyDoc_STRVAR (Matrix_adjugated_doc, ".. method:: adjugated()\n" "\n" " Return an adjugated copy of the matrix.\n" "\n" " :return: the adjugated matrix.\n" " :rtype: :class:`Matrix`\n" " :raises ValueError: if the matrix cannot be adjugated\n") | |
| static PyObject * | Matrix_adjugated (MatrixObject *self) |
| PyDoc_STRVAR (Matrix_rotate_doc, ".. method:: rotate(other)\n" "\n" " Rotates the matrix 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 translation, rotation, and scale components of this matrix.\n" "\n" " :return: tuple of translation, rotation, and scale\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. Uses polar decomposition, see" " \"Matrix Animation and Polar Decomposition\", Shoemake and Duff, 1992.\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 matrix.\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 the determinant of a matrix.\n" " :rtype: float\n" "\n" " .. seealso:: `Determinant <https://en.wikipedia.org/wiki/Determinant>`__ on Wikipedia.\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:: `Transpose <https://en.wikipedia.org/wiki/Transpose>`__ on Wikipedia.\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_normalize_doc, ".. method:: normalize()\n" "\n" " Normalize each of the matrix columns.\n") | |
| static PyObject * | Matrix_normalize (MatrixObject *self) |
| PyDoc_STRVAR (Matrix_normalized_doc, ".. method:: normalized()\n" "\n" " Return a column normalized matrix\n" "\n" " :return: a column normalized matrix\n" " :rtype: :class:`Matrix`\n") | |
| static PyObject * | Matrix_normalized (MatrixObject *self) |
| PyDoc_STRVAR (Matrix_zero_doc, ".. method:: zero()\n" "\n" " Set all the matrix values to zero.\n" "\n" " :rtype: :class:`Matrix`\n") | |
| static PyObject * | Matrix_zero (MatrixObject *self) |
| static void | matrix_identity_internal (MatrixObject *self) |
| PyDoc_STRVAR (Matrix_identity_doc, ".. method:: identity()\n" "\n" " Set the matrix to the identity matrix.\n" "\n" " .. note:: An object with a location and rotation of zero, and a scale of one\n" " will have an identity matrix.\n" "\n" " .. seealso:: `Identity matrix <https://en.wikipedia.org/wiki/Identity_matrix>`__ " "on Wikipedia.\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 Py_hash_t | Matrix_hash (MatrixObject *self) |
| 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_imul (PyObject *m1, PyObject *m2) |
| static PyObject * | Matrix_matmul (PyObject *m1, PyObject *m2) |
| static PyObject * | Matrix_imatmul (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 matrix by rows (default), (read-only).\n\n:type: Matrix Access") | |
| static PyObject * | Matrix_row_get (MatrixObject *self, void *UNUSED(closure)) |
| PyDoc_STRVAR (Matrix_col_doc, "Access the matrix by columns, 3x3 and 4x4 only, (read-only).\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 (read-only).\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, " "(read-only).\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, (read-only).\n\n:type: bool") | |
| static PyObject * | Matrix_is_orthogonal_get (MatrixObject *self, void *UNUSED(closure)) |
| PyDoc_STRVAR (Matrix_is_orthogonal_axis_vectors_doc, "True if this matrix has got orthogonal axis vectors, 3x3 and 4x4 only, " "(read-only).\n\n:type: bool") | |
| static PyObject * | Matrix_is_orthogonal_axis_vectors_get (MatrixObject *self, void *UNUSED(closure)) |
| PyDoc_STRVAR (matrix_doc, ".. class:: Matrix([rows])\n" "\n" " This object gives access to Matrices in Blender, supporting square and rectangular\n" " matrices from 2x2 up to 4x4.\n" "\n" " :param rows: Sequence of rows.\n" " When omitted, a 4x4 identity matrix is constructed.\n" " :type rows: 2d number sequence\n") | |
| PyObject * | Matrix_CreatePyObject (const float *mat, const ushort num_col, const ushort num_row, PyTypeObject *base_type) |
| PyObject * | Matrix_CreatePyObject_wrap (float *mat, const ushort num_col, const ushort num_row, PyTypeObject *base_type) |
| PyObject * | Matrix_CreatePyObject_cb (PyObject *cb_user, const ushort num_col, const ushort num_row, uchar cb_type, uchar cb_subtype) |
| PyObject * | Matrix_CreatePyObject_alloc (float *mat, const ushort num_col, const ushort num_row, PyTypeObject *base_type) |
| static bool | Matrix_ParseCheck (MatrixObject *pymat) |
| int | Matrix_ParseAny (PyObject *o, void *p) |
| int | Matrix_Parse2x2 (PyObject *o, void *p) |
| int | Matrix_Parse3x3 (PyObject *o, void *p) |
| int | Matrix_Parse4x4 (PyObject *o, void *p) |
| 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 | |
| uchar | mathutils_matrix_row_cb_index = -1 |
| Mathutils_Callback | mathutils_matrix_row_cb |
| uchar | mathutils_matrix_col_cb_index = -1 |
| Mathutils_Callback | mathutils_matrix_col_cb |
| uchar | 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 |
| typedef enum eMatrixAccess_t eMatrixAccess_t |
| enum eMatrixAccess_t |
| Enumerator | |
|---|---|
| MAT_ACCESS_ROW | |
| MAT_ACCESS_COL | |
Definition at line 36 of file mathutils_Matrix.c.
Definition at line 1035 of file mathutils_Matrix.c.
References adjoint_m2_m2(), adjoint_m3_m3(), adjoint_m4_m4(), and BLI_assert_unreachable.
Referenced by Matrix_adjugate(), and matrix_invert_with_det_n_internal().
|
static |
Definition at line 594 of file mathutils_Matrix.c.
References mathutils_array_parse(), Matrix_CreatePyObject(), NULL, and size().
|
static |
Definition at line 440 of file mathutils_Matrix.c.
References Matrix_CreatePyObject(), and NULL.
|
static |
Definition at line 734 of file mathutils_Matrix.c.
References ELEM, mathutils_array_parse(), matrix_3x3_as_4x4(), Matrix_CreatePyObject(), norm(), NULL, sqrtf, and x.
|
static |
Definition at line 472 of file mathutils_Matrix.c.
References angle(), angle_to_mat2(), angle_wrap_rad(), axis_angle_to_mat3(), axis_angle_to_mat3_single(), ELEM, mathutils_array_parse(), matrix_3x3_as_4x4(), Matrix_CreatePyObject(), and NULL.
|
static |
Definition at line 627 of file mathutils_Matrix.c.
References ELEM, mathutils_array_parse(), matrix_3x3_as_4x4(), Matrix_CreatePyObject(), norm(), NULL, sqrtf, and x.
|
static |
Definition at line 871 of file mathutils_Matrix.c.
References ELEM, mathutils_array_parse(), matrix_3x3_as_4x4(), Matrix_CreatePyObject(), NULL, and STREQ.
|
static |
Definition at line 571 of file mathutils_Matrix.c.
References mathutils_array_parse(), Matrix_CreatePyObject(), NULL, and unit_m4().
|
static |
Definition at line 170 of file mathutils_Matrix.c.
References BaseMath_ReadCallback.
|
static |
Definition at line 176 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, col, if(), matrix_col_vector_check(), MATRIX_ITEM, min_ii(), and self.
|
static |
Definition at line 223 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, col, if(), matrix_col_vector_check(), and MATRIX_ITEM.
|
static |
Definition at line 199 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, col, if(), matrix_col_vector_check(), MATRIX_ITEM, min_ii(), and self.
|
static |
Definition at line 238 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, col, if(), matrix_col_vector_check(), and MATRIX_ITEM.
|
static |
Definition at line 79 of file mathutils_Matrix.c.
References BaseMath_ReadCallback.
|
static |
Definition at line 85 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, col, if(), MATRIX_ITEM, and matrix_row_vector_check().
|
static |
Definition at line 124 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, col, if(), MATRIX_ITEM, and matrix_row_vector_check().
|
static |
Definition at line 104 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, col, if(), MATRIX_ITEM, and matrix_row_vector_check().
|
static |
Definition at line 139 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, col, if(), MATRIX_ITEM, and matrix_row_vector_check().
|
static |
Definition at line 270 of file mathutils_Matrix.c.
References BaseMath_ReadCallback.
|
static |
Definition at line 276 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, col, if(), and MATRIX_ITEM.
|
static |
Definition at line 309 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, col, if(), and MATRIX_ITEM.
|
static |
Definition at line 292 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, col, if(), and MATRIX_ITEM.
|
static |
Definition at line 321 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, col, if(), and MATRIX_ITEM.
|
static |
Definition at line 416 of file mathutils_Matrix.c.
Referenced by C_Matrix_OrthoProjection(), C_Matrix_Rotation(), C_Matrix_Scale(), and C_Matrix_Shear().
|
static |
Definition at line 396 of file mathutils_Matrix.c.
References Matrix_copy(), NULL, and ret.
Referenced by Matrix_adjugated(), Matrix_normalized(), and Matrix_transposed().
|
static |
Definition at line 2423 of file mathutils_Matrix.c.
References add_vn_vnvn(), BaseMath_ReadCallback, Matrix_CreatePyObject(), MATRIX_MAX_DIM, MatrixObject_Check, NULL, MatrixObject::num_col, and MatrixObject::num_row.
|
static |
Definition at line 1695 of file mathutils_Matrix.c.
References adjoint_matrix_n(), BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, NULL, and self.
Referenced by Matrix_adjugated().
|
static |
Definition at line 1730 of file mathutils_Matrix.c.
References matrix__apply_to_copy(), and Matrix_adjugate().
| void matrix_as_3x3 | ( | float | mat[3][3], |
| MatrixObject * | self | ||
| ) |
Definition at line 972 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(), and Matrix_to_scale().
|
static |
Definition at line 2307 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, col, mathutils_array_parse(), MATRIX_ITEM, MATRIX_MAX_DIM, and self.
Referenced by MatrixAccess_ass_subscript().
|
static |
Definition at line 2281 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, col, mathutils_array_parse(), MATRIX_ITEM, MATRIX_MAX_DIM, and self.
Referenced by Matrix_ass_subscript(), and MatrixAccess_ass_subscript().
|
static |
Definition at line 2362 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, CLAMP, col, mathutils_array_parse(), MATRIX_MAX_DIM, MIN2, self, and size().
Referenced by Matrix_ass_subscript(), and Matrix_new().
|
static |
Definition at line 2787 of file mathutils_Matrix.c.
References Matrix_ass_item_row(), Matrix_ass_slice(), and self.
|
static |
Definition at line 2924 of file mathutils_Matrix.c.
References MAT_ACCESS_COL, and MatrixAccess_CreatePyObject().
|
static |
Definition at line 61 of file mathutils_Matrix.c.
References col, 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 |
Definition at line 979 of file mathutils_Matrix.c.
References BLI_assert, MatrixObject::num_col, and MatrixObject::num_row.
Referenced by Matrix_invert().
|
static |
Definition at line 2072 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_copy_notest(), NULL, and self.
Referenced by matrix__apply_to_copy(), and Matrix_deepcopy().
|
static |
Definition at line 2060 of file mathutils_Matrix.c.
References Matrix_CreatePyObject(), and self.
Referenced by Matrix_copy(), Matrix_inverted(), and Matrix_inverted_safe().
| PyObject* Matrix_CreatePyObject | ( | const float * | mat, |
| const ushort | num_col, | ||
| const ushort | num_row, | ||
| PyTypeObject * | base_type | ||
| ) |
Definition at line 3180 of file mathutils_Matrix.c.
References BASE_MATH_FLAG_DEFAULT, BASE_MATH_NEW, matrix_identity_internal(), matrix_Type, NULL, self, and UNLIKELY.
Referenced by bpy_slot_to_py(), C_Matrix_Diagonal(), C_Matrix_Identity(), C_Matrix_OrthoProjection(), C_Matrix_Rotation(), C_Matrix_Scale(), C_Matrix_Shear(), C_Matrix_Translation(), Euler_to_matrix(), Matrix_add(), Matrix_copy_notest(), Matrix_CreatePyObject_cb(), Matrix_lerp(), Matrix_matmul(), Matrix_mul(), matrix_mul_float(), Matrix_new(), Matrix_sub(), pygpu_matrix_get_model_view_matrix(), pygpu_matrix_get_projection_matrix(), pyrna_math_object_from_array(), pyrna_param_to_py(), and Quaternion_to_matrix().
| PyObject* Matrix_CreatePyObject_alloc | ( | float * | mat, |
| const ushort | num_col, | ||
| const ushort | num_row, | ||
| PyTypeObject * | base_type | ||
| ) |
| mat | Initialized matrix value to use in-place, allocated with #PyMem_Malloc |
Definition at line 3281 of file mathutils_Matrix.c.
References BASE_MATH_FLAG_IS_WRAP, and Matrix_CreatePyObject_wrap().
Referenced by Matrix_to_NxN().
| PyObject* Matrix_CreatePyObject_cb | ( | PyObject * | cb_user, |
| const ushort | num_col, | ||
| const ushort | num_row, | ||
| uchar | cb_type, | ||
| uchar | cb_subtype | ||
| ) |
Definition at line 3264 of file mathutils_Matrix.c.
References Matrix_CreatePyObject(), and NULL.
Referenced by pyrna_math_object_from_array().
| PyObject* Matrix_CreatePyObject_wrap | ( | float * | mat, |
| const ushort | num_col, | ||
| const ushort | num_row, | ||
| PyTypeObject * | base_type | ||
| ) |
Definition at line 3234 of file mathutils_Matrix.c.
References BASE_MATH_FLAG_DEFAULT, BASE_MATH_FLAG_IS_WRAP, BASE_MATH_NEW, matrix_Type, and NULL.
Referenced by Matrix_CreatePyObject_alloc().
|
static |
Definition at line 1781 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_quat(), mat4_to_loc_rot_size(), NULL, PyTuple_SET_ITEMS, Quaternion_CreatePyObject(), ret, rot, self, size(), and Vector_CreatePyObject().
|
static |
Definition at line 2080 of file mathutils_Matrix.c.
References Matrix_copy(), NULL, and PyC_CheckArgs_DeepCopy().
|
static |
Definition at line 1879 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, matrix_determinant_internal(), NULL, and self.
|
static |
Definition at line 1012 of file mathutils_Matrix.c.
References determinant_m2(), determinant_m3(), determinant_m4(), MATRIX_ITEM, and self.
Referenced by Matrix_determinant(), matrix_invert_internal(), and matrix_invert_safe_internal().
|
static |
Definition at line 2219 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMathObject_Prepare_ForHash, mathutils_array_hash(), MATRIX_MAX_DIM, matrix_transpose_internal(), and self.
|
static |
Definition at line 2036 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, matrix_identity_internal(), NULL, and self.
|
static |
Definition at line 2011 of file mathutils_Matrix.c.
References BLI_assert, self, unit_m2(), unit_m3(), and unit_m4().
Referenced by Matrix_CreatePyObject(), and Matrix_identity().
|
static |
Definition at line 2679 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, col, dot(), double(), MATRIX_ITEM, MATRIX_MAX_DIM, MatrixObject_Check, NULL, MatrixObject::num_col, and MatrixObject::num_row.
|
static |
Definition at line 2554 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, MatrixObject_Check, mul_vn_fl(), mul_vn_vn(), NULL, MatrixObject::num_col, and MatrixObject::num_row.
|
static |
Definition at line 1526 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, matrix_copy(), matrix_invert_args_check(), matrix_invert_internal(), matrix_invert_is_compat(), matrix_invert_raise_degenerate(), NULL, and self.
|
static |
Definition at line 1475 of file mathutils_Matrix.c.
References MatrixObject_Check, MatrixObject::num_col, MatrixObject::num_row, and self.
Referenced by Matrix_invert(), and Matrix_inverted().
|
static |
| r_mat | can be from self->matrix or not. |
Definition at line 1081 of file mathutils_Matrix.c.
References BLI_assert, matrix_determinant_internal(), matrix_invert_with_det_n_internal(), and self.
Referenced by Matrix_invert(), Matrix_inverted(), and Matrix_inverted_noargs().
|
static |
Definition at line 1463 of file mathutils_Matrix.c.
References self.
Referenced by Matrix_invert(), Matrix_invert_safe(), Matrix_inverted(), Matrix_inverted_noargs(), and Matrix_inverted_safe().
|
static |
Definition at line 1507 of file mathutils_Matrix.c.
Referenced by Matrix_invert(), Matrix_inverted(), and Matrix_inverted_noargs().
|
static |
Definition at line 1641 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, matrix_invert_is_compat(), matrix_invert_safe_internal(), NULL, and self.
|
static |
Similar to matrix_invert_internal but should never error.
| r_mat | can be from self->matrix or not. |
Definition at line 1099 of file mathutils_Matrix.c.
References BLI_assert, BLI_assert_unreachable, copy_m2_m2(), copy_m3_m3(), copy_m4_m4(), determinant_m2(), determinant_m3_array(), determinant_m4(), eps, float(), matrix_determinant_internal(), matrix_invert_with_det_n_internal(), PSEUDOINVERSE_EPSILON, self, unit_m2(), unit_m3(), unit_m4(), and UNLIKELY.
Referenced by Matrix_invert_safe(), and Matrix_inverted_safe().
|
static |
Definition at line 1057 of file mathutils_Matrix.c.
References adjoint_matrix_n(), BLI_assert, MATRIX_ITEM_INDEX_NUMROW, and MATRIX_MAX_DIM.
Referenced by matrix_invert_internal(), and matrix_invert_safe_internal().
|
static |
Definition at line 1575 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_copy_notest(), matrix_invert_args_check(), matrix_invert_internal(), matrix_invert_is_compat(), matrix_invert_raise_degenerate(), MATRIX_MAX_DIM, and NULL.
|
static |
Definition at line 1608 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, matrix_invert_internal(), matrix_invert_is_compat(), matrix_invert_raise_degenerate(), NULL, and self.
|
static |
Definition at line 1667 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_copy_notest(), matrix_invert_is_compat(), matrix_invert_safe_internal(), MATRIX_MAX_DIM, and NULL.
|
static |
Definition at line 2955 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, is_negative_m3(), is_negative_m4(), NULL, and self.
|
static |
Definition at line 3000 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, is_orthogonal_m3(), is_orthogonal_m4(), NULL, and self.
|
static |
Definition at line 2977 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, is_orthonormal_m3(), is_orthonormal_m4(), NULL, and self.
|
static |
Definition at line 2262 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, col, mathutils_matrix_col_cb_index, NULL, self, and Vector_CreatePyObject_cb().
Referenced by MatrixAccess_slice(), and MatrixAccess_subscript().
|
static |
Definition at line 2246 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, mathutils_matrix_row_cb_index, NULL, self, and Vector_CreatePyObject_cb().
Referenced by Matrix_subscript(), MatrixAccess_slice(), and MatrixAccess_subscript().
|
static |
Definition at line 2239 of file mathutils_Matrix.c.
|
static |
Definition at line 1823 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, blend_m3_m3m3(), blend_m4_m4m4(), interp_m3_m3m3(), interp_m4_m4m4(), Matrix_CreatePyObject(), MATRIX_MAX_DIM, matrix_Type, NULL, MatrixObject::num_col, MatrixObject::num_row, and self.
|
static |
Definition at line 2603 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, col, column_vector_multiplication(), dot(), double(), Matrix_CreatePyObject(), MATRIX_ITEM, MATRIX_MAX_DIM, MatrixObject_Check, NULL, MatrixObject::num_col, MatrixObject::num_row, VectorObject::size, Vector_CreatePyObject(), and VectorObject_Check.
|
static |
Definition at line 2931 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_scale(), matrix_as_3x3(), NULL, and self.
|
static |
Definition at line 2498 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_CreatePyObject(), MATRIX_MAX_DIM, matrix_mul_float(), MatrixObject_Check, mul_vn_vnvn(), NULL, MatrixObject::num_col, and MatrixObject::num_row.
|
static |
Definition at line 2491 of file mathutils_Matrix.c.
References Matrix_CreatePyObject(), MATRIX_MAX_DIM, mul_vn_vn_fl(), MatrixObject::num_col, and MatrixObject::num_row.
Referenced by Matrix_mul().
|
static |
Definition at line 348 of file mathutils_Matrix.c.
References Matrix_ass_slice(), Matrix_CreatePyObject(), NULL, and type.
|
static |
Definition at line 1948 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, normalize_m3(), normalize_m4(), NULL, and self.
Referenced by Matrix_normalized().
|
static |
Definition at line 1984 of file mathutils_Matrix.c.
References matrix__apply_to_copy(), and Matrix_normalize().
| int Matrix_Parse2x2 | ( | PyObject * | o, |
| void * | p | ||
| ) |
Definition at line 3324 of file mathutils_Matrix.c.
References Matrix_ParseCheck(), MatrixObject::num_col, and MatrixObject::num_row.
Referenced by Vector_rotate().
| int Matrix_Parse3x3 | ( | PyObject * | o, |
| void * | p | ||
| ) |
Definition at line 3341 of file mathutils_Matrix.c.
References Matrix_ParseCheck(), MatrixObject::num_col, and MatrixObject::num_row.
| int Matrix_Parse4x4 | ( | PyObject * | o, |
| void * | p | ||
| ) |
Definition at line 3358 of file mathutils_Matrix.c.
References Matrix_ParseCheck(), MatrixObject::num_col, and MatrixObject::num_row.
Referenced by pygpu_matrix_load_matrix(), pygpu_matrix_load_projection_matrix(), pygpu_matrix_multiply_matrix(), and pygpu_offscreen_draw_view3d().
| int Matrix_ParseAny | ( | PyObject * | o, |
| void * | p | ||
| ) |
Definition at line 3312 of file mathutils_Matrix.c.
References Matrix_ParseCheck().
Referenced by bpy_slot_from_py().
|
static |
Use with PyArg_ParseTuple's "O&" formatting.
Definition at line 3298 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, and MatrixObject_Check.
Referenced by Matrix_Parse2x2(), Matrix_Parse3x3(), Matrix_Parse4x4(), and Matrix_ParseAny().
|
static |
Definition at line 2090 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, col, MATRIX_ITEM, MATRIX_MAX_DIM, NULL, and self.
|
static |
Definition at line 1292 of file mathutils_Matrix.c.
References BASE_MATH_FLAG_IS_WRAP, col, copy_m4_m4(), MATRIX_COL_PTR, MATRIX_MAX_DIM, NULL, self, and unit_m4().
|
static |
Definition at line 2178 of file mathutils_Matrix.c.
References Freestyle::a, ATTR_FALLTHROUGH, BaseMath_ReadCallback, EXPP_VectorsAreEqual(), MatrixObject_Check, NULL, MatrixObject::num_col, and MatrixObject::num_row.
|
static |
Definition at line 1745 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, copy_m3_m3(), mathutils_any_to_rotmat(), matrix_as_3x3(), mul_m3_m3m3(), NULL, and self.
|
static |
Definition at line 2916 of file mathutils_Matrix.c.
References MAT_ACCESS_ROW, and MatrixAccess_CreatePyObject().
|
static |
Definition at line 49 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 |
Definition at line 2336 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, CLAMP, count, mathutils_matrix_row_cb_index, MIN2, NULL, self, and Vector_CreatePyObject_cb().
Referenced by Matrix_subscript().
|
static |
Definition at line 2139 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_dynstr_new(), BLI_snprintf(), col, mathutils_dynstr_to_py(), MATRIX_ITEM, MATRIX_MAX_DIM, max_ii(), NULL, self, and size().
|
static |
Definition at line 2457 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_CreatePyObject(), MATRIX_MAX_DIM, MatrixObject_Check, NULL, MatrixObject::num_col, MatrixObject::num_row, and sub_vn_vnvn().
|
static |
Definition at line 2751 of file mathutils_Matrix.c.
References Matrix_item_row(), Matrix_slice(), NULL, and self.
|
static |
Definition at line 1362 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_to_NxN(), and NULL.
|
static |
Definition at line 1377 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_to_NxN(), and NULL.
|
static |
Definition at line 1392 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, Matrix_to_NxN(), and NULL.
|
static |
Definition at line 1219 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, copy_m3_m3(), copy_m3_m4(), copy_v3_v3(), Euler_CreatePyObject(), euler_order_from_string(), EULER_ORDER_XYZ, euler_Type, mat3_normalized_to_compatible_eul(), mat3_normalized_to_compatible_eulO(), mat3_normalized_to_eul(), mat3_normalized_to_eulO(), normalize_m3(), NULL, order, and self.
|
static |
Definition at line 1332 of file mathutils_Matrix.c.
References col, float(), MATRIX_COL_PTR, Matrix_CreatePyObject_alloc(), matrix_unit_internal(), min_ii(), and self.
Referenced by Matrix_to_2x2(), Matrix_to_3x3(), and Matrix_to_4x4().
|
static |
Definition at line 1178 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_quat(), mat4_to_quat(), NULL, Quaternion_CreatePyObject(), and self.
|
static |
Definition at line 1434 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mat3_to_rot_size(), matrix_as_3x3(), NULL, rot, self, size(), and Vector_CreatePyObject().
|
static |
Definition at line 1408 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, MATRIX_COL_PTR, NULL, self, and Vector_CreatePyObject().
|
static |
Definition at line 2865 of file mathutils_Matrix.c.
References BaseMath_ReadCallback, mathutils_matrix_translation_cb_index, NULL, ret, self, and Vector_CreatePyObject_cb().
|
static |
Definition at line 2887 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, copy_v3_v3(), mathutils_array_parse(), and self.
|
static |
Definition at line 1902 of file mathutils_Matrix.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, MATRIX_ITEM, NULL, self, t, transpose_m3(), and transpose_m4().
Referenced by Matrix_transposed().
|
static |
Definition at line 999 of file mathutils_Matrix.c.
References col, MATRIX_ITEM, MatrixObject::num_col, and MatrixObject::num_row.
Referenced by Matrix_hash().
|
static |
Definition at line 1938 of file mathutils_Matrix.c.
References matrix__apply_to_copy(), and Matrix_transpose().
|
static |
Definition at line 987 of file mathutils_Matrix.c.
References col, float(), min_ii(), and self.
Referenced by Matrix_to_NxN().
|
static |
Definition at line 1996 of file mathutils_Matrix.c.
References BaseMath_Prepare_ForWrite, BaseMath_WriteCallback, copy_vn_fl(), NULL, and self.
|
static |
Definition at line 3493 of file mathutils_Matrix.c.
References MAT_ACCESS_ROW, Matrix_ass_item_col(), Matrix_ass_item_row(), MatrixObject::num_col, MatrixObject::num_row, and self.
|
static |
Definition at line 3390 of file mathutils_Matrix.c.
References self.
Referenced by MatrixAccess_dealloc().
|
static |
Definition at line 3573 of file mathutils_Matrix.c.
References matrix_access_Type, MatrixAccessObject::matrix_user, type, and MatrixAccessObject::type.
Referenced by Matrix_col_get(), and Matrix_row_get().
|
static |
Definition at line 3396 of file mathutils_Matrix.c.
References MatrixAccess_clear(), and self.
|
static |
Definition at line 3522 of file mathutils_Matrix.c.
References MATRIX_MAX_DIM, MatrixAccess_slice(), NULL, and ret.
|
static |
Definition at line 3408 of file mathutils_Matrix.c.
References MAT_ACCESS_ROW, and self.
Referenced by MatrixAccess_subscript().
|
static |
Definition at line 3413 of file mathutils_Matrix.c.
References CLAMP, count, MAT_ACCESS_ROW, Matrix_item_col(), Matrix_item_row(), MIN2, MatrixObject::num_col, MatrixObject::num_row, and self.
Referenced by MatrixAccess_iter(), and MatrixAccess_subscript().
|
static |
Definition at line 3447 of file mathutils_Matrix.c.
References MAT_ACCESS_ROW, Matrix_item_col(), Matrix_item_row(), MatrixAccess_len(), MatrixAccess_slice(), NULL, MatrixObject::num_col, MatrixObject::num_row, and self.
|
static |
Definition at line 3384 of file mathutils_Matrix.c.
References self.
| PyDoc_STRVAR | ( | C_Matrix_Diagonal_doc | , |
| ".. classmethod:: Diagonal(vector)\n" "\n" " Create a diagonal (scaling) matrix using the values from the vector.\n" "\n" " :arg vector: The vector of values for the diagonal.\n" " :type vector: :class:`Vector`\n" " :return: A diagonal matrix.\n" " :rtype: :class:`Matrix`\n" | |||
| ) |
| PyDoc_STRVAR | ( | C_Matrix_Identity_doc | , |
| ".. classmethod:: Identity(size)\n" "\n" " Create an identity matrix.\n" "\n" " :arg size: The size of the identity matrix to construct .\n" " :type size: int\n" " :return: A new identity 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_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 in 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" | [2, 4][ 'X', 'Y', 'Z'] | ||
| ) |
| 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_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 corresponding 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_adjugate_doc | , |
| ".. method:: adjugate()\n" "\n" " Set the matrix to its adjugate.\n" "\n" " :raises ValueError: if the matrix cannot be adjugate.\n" "\n" " .. seealso:: `Adjugate matrix <https://en.wikipedia.org/wiki/Adjugate_matrix>`__ on " "Wikipedia.\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_adjugated_doc | , |
| ".. method:: adjugated()\n" "\n" " Return an adjugated copy of the matrix.\n" "\n" " :return: the adjugated matrix.\n" " :rtype: :class:`Matrix`\n" " :raises ValueError: if the matrix cannot be adjugated\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_col_doc | , |
| "Access the matrix by | columns, | ||
| 3x3 and 4x4 | only, | ||
| (read-only).\n\n:type:Matrix Access" | |||
| ) |
| 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_decompose_doc | , |
| ".. method:: decompose()\n" "\n" " Return the | translation, | ||
| rotation | , | ||
| and scale components of this matrix.\n" "\n" " :return:tuple of | translation, | ||
| rotation | , | ||
| and scale\n" " :rtype:(:class:`Vector`, :class:`Quaternion`, :class:`Vector`)" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_determinant_doc | , |
| ".. method:: determinant()\n" "\n" " Return the determinant of a matrix.\n" "\n" " :return: Return the determinant of a matrix.\n" " :rtype: float\n" "\n" " .. seealso:: `Determinant <https://en.wikipedia.org/wiki/Determinant>`__ on Wikipedia.\n" | |||
| ) |
| PyDoc_STRVAR | ( | matrix_doc | , |
| ".. class:: Matrix([rows])\n" "\n" " This object gives access to Matrices in | Blender, | ||
| supporting square and rectangular\n" " matrices from 2x2 up to 4x4.\n" "\n" " :param rows:Sequence of rows.\n" " When | omitted, | ||
| a 4x4 identity matrix is constructed.\n" " :type rows:2d number sequence\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_identity_doc | , |
| ".. method:: identity()\n" "\n" " Set the matrix to the identity matrix.\n" "\n" " .. note:: An object with a location and rotation of | zero, | ||
| and a scale of one\n" " will have an identity matrix.\n" "\n" " .. seealso::`Identity matrix< https://en.wikipedia.org/wiki/Identity_matrix >`__ " "on Wikipedia.\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_invert_doc | , |
| ".. method:: invert(fallback=None)\n" "\n" " Set the matrix to its inverse.\n" "\n" " :arg fallback: Set the matrix to this value when the inverse cannot be calculated\n" " (instead of raising a :exc:`ValueError` exception).\n" " :type fallback: :class:`Matrix`\n" "\n" " .. seealso:: `Inverse matrix <https://en.wikipedia.org/wiki/Inverse_matrix>`__ on " "Wikipedia.\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_invert_safe_doc | , |
| ".. method:: invert_safe()\n" "\n" " Set the matrix to its | inverse, | ||
| will never error.\n" " If | degeneratede.g. zero scale on an axis, | ||
| add some epsilon to its | diagonal, | ||
| " "to get an invertible one.\n" " If tweaked matrix is still | degenerated, | ||
| set to the identity matrix instead.\n" "\n" " .. seealso::`Inverse Matrix< https://en.wikipedia.org/wiki/Inverse_matrix >`__ on " "Wikipedia.\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_inverted_doc | , |
| ".. method:: inverted(fallback=None)\n" "\n" " Return an inverted copy of the matrix.\n" "\n" " :arg fallback: return this when the inverse can't be calculated\n" " (instead of raising a :exc:`ValueError`).\n" " :type fallback: any\n" " :return: the inverted matrix or fallback when given.\n" " :rtype: :class:`Matrix`\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_inverted_safe_doc | , |
| ".. method:: inverted_safe()\n" "\n" " Return an inverted copy of the | matrix, | ||
| will never error.\n" " If | degeneratede.g. zero scale on an axis, | ||
| add some epsilon to its | diagonal, | ||
| " "to get an invertible one.\n" " If tweaked matrix is still | degenerated, | ||
| return the identity matrix instead.\n" "\n" " :return:the inverted matrix.\n" " :rtype::class:`Matrix`\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_is_negative_doc | , |
| "True if this matrix results in a negative | scale, | ||
| 3x3 and 4x4 | only, | ||
| " "(read-only).\n\n:type:bool" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_is_orthogonal_axis_vectors_doc | , |
| "True if this matrix has got orthogonal axis | vectors, | ||
| 3x3 and 4x4 | only, | ||
| " "(read-only).\n\n:type:bool" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_is_orthogonal_doc | , |
| "True if this matrix is | orthogonal, | ||
| 3x3 and 4x4 | only, | ||
| (read-only).\n\n:type:bool" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_lerp_doc | , |
| ".. function:: lerp(other, factor)\n" "\n" " Returns the interpolation of two matrices. Uses polar | decomposition, | ||
| see" " \"Matrix Animation and Polar Decomposition\" | , | ||
| Shoemake and | Duff, | ||
| 1992.\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 matrix.\n" " :rtype::class:`Matrix`\n" | [0.0, 1.0] | ||
| ) |
| PyDoc_STRVAR | ( | Matrix_median_scale_doc | , |
| "The average scale applied to each axis (read-only).\n\n:type: float" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_normalize_doc | , |
| ".. method:: normalize()\n" "\n" " Normalize each of the matrix columns.\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_normalized_doc | , |
| ".. method:: normalized()\n" "\n" " Return a column normalized matrix\n" "\n" " :return: a column normalized matrix\n" " :rtype: :class:`Matrix`\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_resize_4x4_doc | , |
| ".. method:: resize_4x4()\n" "\n" " Resize the matrix to 4x4.\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_rotate_doc | , |
| ".. method:: rotate(other)\n" "\n" " Rotates the matrix 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_row_doc | , |
| "Access the matrix by rows | default, | ||
| (read-only).\n\n:type:Matrix Access" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_to_2x2_doc | , |
| ".. method:: to_2x2()\n" "\n" " Return a 2x2 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_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_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_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_scale_doc | , |
| ".. method:: to_scale()\n" "\n" " Return the scale part of a 3x3 or 4x4 matrix.\n" "\n" " :return: Return the scale of a matrix.\n" " :rtype: :class:`Vector`\n" "\n" " .. note:: This method does not return a negative scale on any axis because it is " "not possible to obtain this data from the matrix alone.\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_to_translation_doc | , |
| ".. method:: to_translation()\n" "\n" " Return the translation part of a 4 row matrix.\n" "\n" " :return: Return the translation of a matrix.\n" " :rtype: :class:`Vector`\n" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_translation_doc | , |
| "The translation component of the matrix.\n\n:type: Vector" | |||
| ) |
| PyDoc_STRVAR | ( | Matrix_transpose_doc | , |
| ".. method:: transpose()\n" "\n" " Set the matrix to its transpose.\n" "\n" " .. seealso:: `Transpose <https://en.wikipedia.org/wiki/Transpose>`__ on Wikipedia.\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" " :rtype: :class:`Matrix`\n" | |||
| ) |
| Mathutils_Callback mathutils_matrix_col_cb |
Definition at line 255 of file mathutils_Matrix.c.
Referenced by PyInit_mathutils().
| uchar mathutils_matrix_col_cb_index = -1 |
Definition at line 168 of file mathutils_Matrix.c.
Referenced by Matrix_item_col(), and PyInit_mathutils().
| Mathutils_Callback mathutils_matrix_row_cb |
Definition at line 156 of file mathutils_Matrix.c.
Referenced by PyInit_mathutils().
| uchar mathutils_matrix_row_cb_index = -1 |
Definition at line 77 of file mathutils_Matrix.c.
Referenced by Matrix_item_row(), Matrix_slice(), and PyInit_mathutils().
| Mathutils_Callback mathutils_matrix_translation_cb |
Definition at line 335 of file mathutils_Matrix.c.
Referenced by PyInit_mathutils().
| uchar mathutils_matrix_translation_cb_index = -1 |
Definition at line 268 of file mathutils_Matrix.c.
Referenced by Matrix_translation_get(), and PyInit_mathutils().
| PyTypeObject matrix_access_Type |
Definition at line 3545 of file mathutils_Matrix.c.
Referenced by MatrixAccess_CreatePyObject(), and PyInit_mathutils().
|
static |
Definition at line 2819 of file mathutils_Matrix.c.
|
static |
Definition at line 3023 of file mathutils_Matrix.c.
|
static |
Definition at line 3023 of file mathutils_Matrix.c.
|
static |
Definition at line 2825 of file mathutils_Matrix.c.
|
static |
Definition at line 2738 of file mathutils_Matrix.c.
| PyTypeObject matrix_Type |
Definition at line 3128 of file mathutils_Matrix.c.
Referenced by bpy_bmesh_transform(), Matrix_CreatePyObject(), Matrix_CreatePyObject_wrap(), Matrix_lerp(), and PyInit_mathutils().
|
static |
Definition at line 3539 of file mathutils_Matrix.c.