Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/mathutils/mathutils.h
| Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | |||||
| struct Mathutils_Callback { | struct Mathutils_Callback { | ||||
| BaseMathCheckFunc check; | BaseMathCheckFunc check; | ||||
| BaseMathGetFunc get; | BaseMathGetFunc get; | ||||
| BaseMathSetFunc set; | BaseMathSetFunc set; | ||||
| BaseMathGetIndexFunc get_index; | BaseMathGetIndexFunc get_index; | ||||
| BaseMathSetIndexFunc set_index; | BaseMathSetIndexFunc set_index; | ||||
| }; | }; | ||||
| typedef enum { | |||||
| ADD, | |||||
| SUB, | |||||
| MUL, | |||||
| DIV, | |||||
| } Mathutils_Elem_Ops; | |||||
| unsigned char Mathutils_RegisterCallback(Mathutils_Callback *cb); | unsigned char Mathutils_RegisterCallback(Mathutils_Callback *cb); | ||||
| int _BaseMathObject_ReadCallback(BaseMathObject *self); | int _BaseMathObject_ReadCallback(BaseMathObject *self); | ||||
| int _BaseMathObject_WriteCallback(BaseMathObject *self); | int _BaseMathObject_WriteCallback(BaseMathObject *self); | ||||
| int _BaseMathObject_ReadIndexCallback(BaseMathObject *self, int index); | int _BaseMathObject_ReadIndexCallback(BaseMathObject *self, int index); | ||||
| int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index); | int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index); | ||||
| void _BaseMathObject_RaiseFrozenExc(const BaseMathObject *self); | void _BaseMathObject_RaiseFrozenExc(const BaseMathObject *self); | ||||
| Show All 27 Lines | #define BaseMathObject_Prepare_ForHash(_self) \ | ||||
| (_BaseMathObject_RaiseNotFrozenExc((BaseMathObject *)_self), -1) : 0) | (_BaseMathObject_RaiseNotFrozenExc((BaseMathObject *)_self), -1) : 0) | ||||
| /* utility func */ | /* utility func */ | ||||
| int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *value, const char *error_prefix); | int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *value, const char *error_prefix); | ||||
| int mathutils_array_parse_alloc(float **array, int array_min, PyObject *value, const char *error_prefix); | int mathutils_array_parse_alloc(float **array, int array_min, PyObject *value, const char *error_prefix); | ||||
| int mathutils_array_parse_alloc_v(float **array, int array_dim, PyObject *value, const char *error_prefix); | int mathutils_array_parse_alloc_v(float **array, int array_dim, PyObject *value, const char *error_prefix); | ||||
| int mathutils_any_to_rotmat(float rmat[3][3], PyObject *value, const char *error_prefix); | int mathutils_any_to_rotmat(float rmat[3][3], PyObject *value, const char *error_prefix); | ||||
| PyObject *mathtutils_generic_elem_op(PyObject *val1, PyObject *val2, Mathutils_Elem_Ops op); | |||||
| PyObject *mathtutils_generic_elem_op_inplace(PyObject *val1, PyObject *val2, Mathutils_Elem_Ops op); | |||||
| Py_hash_t mathutils_array_hash(const float *float_array, size_t array_len); | Py_hash_t mathutils_array_hash(const float *float_array, size_t array_len); | ||||
| /* zero remaining unused elements of the array */ | /* zero remaining unused elements of the array */ | ||||
| #define MU_ARRAY_ZERO (1u << 30) | #define MU_ARRAY_ZERO (1u << 30) | ||||
| /* ignore larger py sequences than requested (just use first elements), | /* ignore larger py sequences than requested (just use first elements), | ||||
| * handy when using 3d vectors as 2d */ | * handy when using 3d vectors as 2d */ | ||||
| #define MU_ARRAY_SPILL (1u << 31) | #define MU_ARRAY_SPILL (1u << 31) | ||||
| Show All 10 Lines | |||||