26#define BASE_MATH_NEW(struct_name, root_type, base_type) \
27 ((struct_name *)_BaseMathObject_new_impl(&root_type, base_type))
43#define BASE_MATH_FLAG_DEFAULT 0
45#define BASE_MATH_MEMBERS(_data) \
52 unsigned char cb_type; \
55 unsigned char cb_subtype; \
71#define BaseMathObject_CheckExact(v) (Py_TYPE(v)->tp_dealloc == (destructor)BaseMathObject_dealloc)
124#define BaseMath_CheckCallback(_self) \
125 (((_self)->cb_user ? _BaseMathObject_CheckCallback((BaseMathObject *)_self) : 0))
126#define BaseMath_ReadCallback(_self) \
127 (((_self)->cb_user ? _BaseMathObject_ReadCallback((BaseMathObject *)_self) : 0))
128#define BaseMath_WriteCallback(_self) \
129 (((_self)->cb_user ? _BaseMathObject_WriteCallback((BaseMathObject *)_self) : 0))
130#define BaseMath_ReadIndexCallback(_self, _index) \
131 (((_self)->cb_user ? _BaseMathObject_ReadIndexCallback((BaseMathObject *)_self, _index) : 0))
132#define BaseMath_WriteIndexCallback(_self, _index) \
133 (((_self)->cb_user ? _BaseMathObject_WriteIndexCallback((BaseMathObject *)_self, _index) : 0))
136#define BaseMath_ReadCallback_ForWrite(_self) \
137 (UNLIKELY((_self)->flag & BASE_MATH_FLAG_IS_FROZEN) ? \
138 (_BaseMathObject_RaiseFrozenExc((BaseMathObject *)_self), -1) : \
139 (BaseMath_ReadCallback(_self)))
141#define BaseMath_ReadIndexCallback_ForWrite(_self, _index) \
142 (UNLIKELY((_self)->flag & BASE_MATH_FLAG_IS_FROZEN) ? \
143 (_BaseMathObject_RaiseFrozenExc((BaseMathObject *)_self), -1) : \
144 (BaseMath_ReadIndexCallback(_self, _index)))
146#define BaseMath_Prepare_ForWrite(_self) \
147 (UNLIKELY((_self)->flag & BASE_MATH_FLAG_IS_FROZEN) ? \
148 (_BaseMathObject_RaiseFrozenExc((BaseMathObject *)_self), -1) : \
151#define BaseMathObject_Prepare_ForHash(_self) \
152 (UNLIKELY(((_self)->flag & BASE_MATH_FLAG_IS_FROZEN) == 0) ? \
153 (_BaseMathObject_RaiseNotFrozenExc((BaseMathObject *)_self), -1) : \
162 float *
array,
int array_num_min,
int array_num_max, PyObject *value,
const char *error_prefix);
169 const char *error_prefix);
176 const char *error_prefix);
183 const char *error_prefix);
190 const char *error_prefix);
195 const char *error_prefix,
207#define MU_ARRAY_ZERO (1u << 30)
210#define MU_ARRAY_SPILL (1u << 31)
212#define MU_ARRAY_FLAGS (MU_ARRAY_ZERO | MU_ARRAY_SPILL)
227#ifndef MATH_STANDALONE
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
int(* BaseMathGetFunc)(BaseMathObject *, int)
@ BASE_MATH_FLAG_IS_FROZEN
int _BaseMathObject_CheckCallback(BaseMathObject *self)
int EXPP_FloatsAreEqual(float af, float bf, int maxDiff)
int(* BaseMathGetIndexFunc)(BaseMathObject *, int, int)
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(* BaseMathSetIndexFunc)(BaseMathObject *, int, int)
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(* BaseMathSetFunc)(BaseMathObject *, int)
int mathutils_array_parse_alloc_vi(int **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)
char BaseMathObject_is_valid_doc[]
char BaseMathObject_is_wrapped_doc[]
PyObject * BaseMathObject_owner_get(BaseMathObject *self, void *)
char BaseMathObject_is_frozen_doc[]
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)
PyObject * BaseMathObject_is_frozen_get(BaseMathObject *self, void *)
PyObject * BaseMathObject_freeze(BaseMathObject *self)
#define BASE_MATH_MEMBERS(_data)
PyObject * BaseMathObject_is_wrapped_get(BaseMathObject *self, void *)
PyObject * mathutils_dynstr_to_py(struct DynStr *ds)
char BaseMathObject_owner_doc[]
int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index)
char BaseMathObject_freeze_doc[]
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)
int(* BaseMathCheckFunc)(BaseMathObject *)
unsigned char Mathutils_RegisterCallback(Mathutils_Callback *cb)
void _BaseMathObject_RaiseNotFrozenExc(const BaseMathObject *self)
int BaseMathObject_traverse(BaseMathObject *self, visitproc visit, void *arg)
BaseMathSetIndexFunc set_index
BaseMathGetIndexFunc get_index