28 #define MatrixObject_Check(v) PyObject_TypeCheck((v), &matrix_Type)
29 #define MatrixObject_CheckExact(v) (Py_TYPE(v) == &matrix_Type)
31 #define MATRIX_MAX_DIM 4
36 # define MATRIX_ITEM_ASSERT(_mat, _row, _col) \
37 (BLI_assert(_row < (_mat)->num_row && _col < (_mat)->num_col))
39 # define MATRIX_ITEM_ASSERT(_mat, _row, _col) (void)0
42 #define MATRIX_ITEM_INDEX_NUMROW(_totrow, _row, _col) (((_totrow) * (_col)) + (_row))
43 #define MATRIX_ITEM_INDEX(_mat, _row, _col) \
44 (MATRIX_ITEM_ASSERT(_mat, _row, _col), (((_mat)->num_row * (_col)) + (_row)))
45 #define MATRIX_ITEM_PTR(_mat, _row, _col) ((_mat)->matrix + MATRIX_ITEM_INDEX(_mat, _row, _col))
46 #define MATRIX_ITEM(_mat, _row, _col) ((_mat)->matrix[MATRIX_ITEM_INDEX(_mat, _row, _col)])
48 #define MATRIX_COL_INDEX(_mat, _col) (MATRIX_ITEM_INDEX(_mat, 0, _col))
49 #define MATRIX_COL_PTR(_mat, _col) ((_mat)->matrix + MATRIX_COL_INDEX(_mat, _col))
73 const unsigned short num_col,
74 const unsigned short num_row,
75 unsigned char cb_type,
#define ATTR_NONNULL(...)
void BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() ATTR_WARN_UNUSED_RESULT
int Matrix_Parse3x3(PyObject *o, void *p)
int Matrix_ParseAny(PyObject *o, void *p)
unsigned char mathutils_matrix_translation_cb_index
unsigned char mathutils_matrix_row_cb_index
PyObject * Matrix_CreatePyObject_alloc(float *mat, const ushort num_col, const ushort num_row, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
PyObject * Matrix_CreatePyObject(const float *mat, const ushort num_col, const ushort num_row, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
PyObject * Matrix_CreatePyObject_wrap(float *mat, const ushort num_col, const ushort num_row, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
PyTypeObject matrix_access_Type
struct Mathutils_Callback mathutils_matrix_row_cb
void matrix_as_3x3(float mat[3][3], MatrixObject *self)
int Matrix_Parse2x2(PyObject *o, void *p)
struct Mathutils_Callback mathutils_matrix_col_cb
int Matrix_Parse4x4(PyObject *o, void *p)
PyObject * Matrix_CreatePyObject_cb(PyObject *user, const unsigned short num_col, const unsigned short num_row, unsigned char cb_type, unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT
unsigned char mathutils_matrix_col_cb_index
struct Mathutils_Callback mathutils_matrix_translation_cb
BASE_MATH_MEMBERS(matrix)