27#define BASE_MATH_NEW(struct_name, root_type, base_type) \
28 ((struct_name *)_BaseMathObject_new_impl(&root_type, base_type))
52#define BASE_MATH_FLAG_DEFAULT 0
54#define BASE_MATH_MEMBERS(_data) \
61 unsigned char cb_type; \
64 unsigned char cb_subtype; \
80#define BaseMathObject_CheckExact(v) (Py_TYPE(v)->tp_dealloc == (destructor)BaseMathObject_dealloc)
131 const char *error_prefix);
140#define BaseMath_CheckCallback(_self) \
141 (((_self)->cb_user ? _BaseMathObject_CheckCallback((BaseMathObject *)_self) : 0))
142#define BaseMath_ReadCallback(_self) \
143 (((_self)->cb_user ? _BaseMathObject_ReadCallback((BaseMathObject *)_self) : 0))
144#define BaseMath_WriteCallback(_self) \
145 (((_self)->cb_user ? _BaseMathObject_WriteCallback((BaseMathObject *)_self) : 0))
146#define BaseMath_ReadIndexCallback(_self, _index) \
147 (((_self)->cb_user ? _BaseMathObject_ReadIndexCallback((BaseMathObject *)_self, _index) : 0))
148#define BaseMath_WriteIndexCallback(_self, _index) \
149 (((_self)->cb_user ? _BaseMathObject_WriteIndexCallback((BaseMathObject *)_self, _index) : 0))
152#define BaseMath_ReadCallback_ForWrite(_self) \
153 (UNLIKELY((_self)->flag & BASE_MATH_FLAG_IS_FROZEN) ? \
154 (_BaseMathObject_RaiseFrozenExc((BaseMathObject *)_self), -1) : \
155 (BaseMath_ReadCallback(_self)))
157#define BaseMath_ReadIndexCallback_ForWrite(_self, _index) \
158 (UNLIKELY((_self)->flag & BASE_MATH_FLAG_IS_FROZEN) ? \
159 (_BaseMathObject_RaiseFrozenExc((BaseMathObject *)_self), -1) : \
160 (BaseMath_ReadIndexCallback(_self, _index)))
162#define BaseMath_Prepare_ForWrite(_self) \
163 (UNLIKELY((_self)->flag & BASE_MATH_FLAG_IS_FROZEN) ? \
164 (_BaseMathObject_RaiseFrozenExc((BaseMathObject *)_self), -1) : \
167#define BaseMathObject_Prepare_ForHash(_self) \
168 (UNLIKELY(((_self)->flag & BASE_MATH_FLAG_IS_FROZEN) == 0) ? \
169 (_BaseMathObject_RaiseNotFrozenExc((BaseMathObject *)_self), -1) : \
175#define BaseMathObject_Prepare_ForResize(_self, error_prefix) \
176 _BaseMathObject_ResizeOkOrRaiseExc((BaseMathObject *)_self, error_prefix)
184#define BaseMath_Prepare_ForBufferAccess(_self, _view, _flags) \
185 _BaseMathObject_RaiseBufferViewExc((BaseMathObject *)_self, _view, _flags)
193 float *
array,
int array_num_min,
int array_num_max, PyObject *value,
const char *error_prefix);
200 const char *error_prefix);
207 const char *error_prefix);
214 const char *error_prefix);
221 const char *error_prefix);
226 const char *error_prefix,
230 const char *error_prefix);
240#define MU_ARRAY_ZERO (1u << 30)
243#define MU_ARRAY_SPILL (1u << 31)
245#define MU_ARRAY_FLAGS (MU_ARRAY_ZERO | MU_ARRAY_SPILL)
262#ifndef MATH_STANDALONE
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
char BaseMathObject_is_valid_doc[]
char BaseMathObject_is_wrapped_doc[]
char BaseMathObject_is_frozen_doc[]
char BaseMathObject_owner_doc[]
char BaseMathObject_freeze_doc[]
int _BaseMathObject_CheckCallback(BaseMathObject *self)
int _BaseMathObject_RaiseBufferViewExc(BaseMathObject *self, Py_buffer *view, int flags)
int EXPP_FloatsAreEqual(float af, float bf, int maxDiff)
bool mathutils_array_parse_alloc_viseq(PyObject *value, const char *error_prefix, blender::Array< blender::Vector< int > > &r_data)
PyMODINIT_FUNC PyInit_mathutils()
int mathutils_array_parse_alloc(float **array, int array_num_min, PyObject *value, const char *error_prefix)
int BaseMathObject_is_gc(BaseMathObject *self)
void _BaseMathObject_RaiseFrozenExc(const BaseMathObject *self)
Py_hash_t mathutils_array_hash(const float *array, size_t array_len)
void BaseMathObject_dealloc(BaseMathObject *self)
int _BaseMathObject_WriteCallback(BaseMathObject *self)
int mathutils_int_array_parse(int *array, int array_dim, PyObject *value, const char *error_prefix)
int EXPP_VectorsAreEqual(const float *vecA, const float *vecB, int size, int floatSteps)
int mathutils_array_parse(float *array, int array_num_min, int array_num_max, PyObject *value, const char *error_prefix)
int mathutils_array_parse_alloc_vi(int **array, int array_dim, PyObject *value, const char *error_prefix)
int(*)(BaseMathObject *, int) BaseMathGetFunc
int(*)(BaseMathObject *, int) BaseMathSetFunc
int mathutils_array_parse_alloc_v(float **array, int array_dim, PyObject *value, const char *error_prefix)
int _BaseMathObject_ResizeOkOrRaiseExc(BaseMathObject *self, const char *error_prefix)
PyObject * BaseMathObject_owner_get(BaseMathObject *self, void *)
PyObject * _BaseMathObject_new_impl(PyTypeObject *root_type, PyTypeObject *base_type)
int mathutils_any_to_rotmat(float rmat[3][3], PyObject *value, const char *error_prefix)
int column_vector_multiplication(float r_vec[4], VectorObject *vec, MatrixObject *mat)
int(*)(BaseMathObject *, int, int) BaseMathSetIndexFunc
PyObject * BaseMathObject_is_frozen_get(BaseMathObject *self, void *)
PyObject * BaseMathObject_freeze(BaseMathObject *self)
int(*)(BaseMathObject *) BaseMathCheckFunc
int(*)(BaseMathObject *, int, int) BaseMathGetIndexFunc
#define BASE_MATH_MEMBERS(_data)
PyObject * BaseMathObject_is_wrapped_get(BaseMathObject *self, void *)
PyObject * mathutils_dynstr_to_py(struct DynStr *ds)
int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index)
PyObject * BaseMathObject_is_valid_get(BaseMathObject *self, void *)
int BaseMathObject_clear(BaseMathObject *self)
int _BaseMathObject_ReadIndexCallback(BaseMathObject *self, int index)
int _BaseMathObject_ReadCallback(BaseMathObject *self)
unsigned char Mathutils_RegisterCallback(Mathutils_Callback *cb)
void _BaseMathObject_RaiseNotFrozenExc(const BaseMathObject *self)
@ BASE_MATH_FLAG_HAS_BUFFER_VIEW
@ BASE_MATH_FLAG_IS_FROZEN
int BaseMathObject_traverse(BaseMathObject *self, visitproc visit, void *arg)
BaseMathSetIndexFunc set_index
BaseMathGetIndexFunc get_index