|
Blender
V2.59
|
#include "mathutils_Vector.h"#include "mathutils_Matrix.h"#include "mathutils_Quaternion.h"#include "mathutils_Euler.h"#include "mathutils_Color.h"#include "mathutils_geometry.h"Go to the source code of this file.
Classes | |
| struct | BaseMathObject |
| struct | Mathutils_Callback |
Defines | |
| #define | BASE_MATH_MEMBERS(_data) |
| #define | Py_NEW 1 |
| #define | Py_WRAP 2 |
| #define | BaseMath_ReadCallback(_self) (((_self)->cb_user ? _BaseMathObject_ReadCallback((BaseMathObject *)_self):0)) |
| #define | BaseMath_WriteCallback(_self) (((_self)->cb_user ?_BaseMathObject_WriteCallback((BaseMathObject *)_self):0)) |
| #define | BaseMath_ReadIndexCallback(_self, _index) (((_self)->cb_user ? _BaseMathObject_ReadIndexCallback((BaseMathObject *)_self, _index):0)) |
| #define | BaseMath_WriteIndexCallback(_self, _index) (((_self)->cb_user ? _BaseMathObject_WriteIndexCallback((BaseMathObject *)_self, _index):0)) |
Typedefs | |
| typedef struct Mathutils_Callback | Mathutils_Callback |
| typedef int(* | BaseMathCheckFunc )(BaseMathObject *) |
| typedef int(* | BaseMathGetFunc )(BaseMathObject *, int) |
| typedef int(* | BaseMathSetFunc )(BaseMathObject *, int) |
| typedef int(* | BaseMathGetIndexFunc )(BaseMathObject *, int, int) |
| typedef int(* | BaseMathSetIndexFunc )(BaseMathObject *, int, int) |
Functions | |
| PyObject * | BaseMathObject_getOwner (BaseMathObject *self, void *) |
| PyObject * | BaseMathObject_getWrapped (BaseMathObject *self, void *) |
| int | BaseMathObject_traverse (BaseMathObject *self, visitproc visit, void *arg) |
| int | BaseMathObject_clear (BaseMathObject *self) |
| void | BaseMathObject_dealloc (BaseMathObject *self) |
| PyMODINIT_FUNC | PyInit_mathutils (void) |
| int | EXPP_FloatsAreEqual (float A, float B, int floatSteps) |
| int | EXPP_VectorsAreEqual (float *vecA, float *vecB, int size, int floatSteps) |
| int | Mathutils_RegisterCallback (Mathutils_Callback *cb) |
| int | _BaseMathObject_ReadCallback (BaseMathObject *self) |
| int | _BaseMathObject_WriteCallback (BaseMathObject *self) |
| int | _BaseMathObject_ReadIndexCallback (BaseMathObject *self, int index) |
| int | _BaseMathObject_WriteIndexCallback (BaseMathObject *self, int index) |
| int | mathutils_array_parse (float *array, int array_min, int array_max, PyObject *value, const char *error_prefix) |
| int | mathutils_any_to_rotmat (float rmat[3][3], PyObject *value, const char *error_prefix) |
| int | column_vector_multiplication (float rvec[4], VectorObject *vec, MatrixObject *mat) |
Variables | |
| char | BaseMathObject_Wrapped_doc [] |
| char | BaseMathObject_Owner_doc [] |
| #define BASE_MATH_MEMBERS | ( | _data | ) |
PyObject_VAR_HEAD \
float *_data; /* array of data (alias), wrapped status depends on wrapped status */ \
PyObject *cb_user; /* if this vector references another object, otherwise NULL, *Note* this owns its reference */ \
unsigned char cb_type; /* which user funcs do we adhere to, RNA, GameObject, etc */ \
unsigned char cb_subtype; /* subtype: location, rotation... to avoid defining many new functions for every attribute of the same type */ \
unsigned char wrapped;
Definition at line 44 of file mathutils.h.
| #define BaseMath_ReadCallback | ( | _self | ) | (((_self)->cb_user ? _BaseMathObject_ReadCallback((BaseMathObject *)_self):0)) |
Definition at line 103 of file mathutils.h.
Referenced by Color_add(), Color_ass_slice(), Color_copy(), Color_div(), Color_getChannelHSV(), Color_getHSV(), Color_iadd(), Color_idiv(), Color_imul(), Color_isub(), Color_mul(), Color_neg(), Color_repr(), Color_richcmpr(), Color_setChannelHSV(), Color_slice(), Color_sub(), Euler_ass_slice(), Euler_copy(), Euler_getOrder(), Euler_make_compatible(), Euler_repr(), Euler_richcmpr(), Euler_rotate(), Euler_rotate_axis(), Euler_slice(), Euler_to_matrix(), Euler_to_quaternion(), M_Geometry_area_tri(), M_Geometry_interpolate_bezier(), M_Geometry_intersect_line_line(), M_Geometry_intersect_line_line_2d(), M_Geometry_intersect_line_plane(), M_Geometry_intersect_line_sphere(), M_Geometry_intersect_line_sphere_2d(), M_Geometry_intersect_point_line(), M_Geometry_intersect_point_quad_2d(), M_Geometry_intersect_point_tri_2d(), M_Geometry_intersect_ray_tri(), M_Geometry_normal(), M_Geometry_tesselate_polygon(), mathutils_any_to_rotmat(), mathutils_array_parse(), mathutils_matrix_vector_check(), mathutils_matrix_vector_get(), mathutils_matrix_vector_get_index(), mathutils_matrix_vector_set(), mathutils_matrix_vector_set_index(), Matrix_add(), Matrix_ass_item(), Matrix_ass_slice(), Matrix_copy(), Matrix_decompose(), Matrix_determinant(), Matrix_identity(), Matrix_inv(), Matrix_invert(), Matrix_is_negative_get(), Matrix_is_orthogonal_get(), Matrix_item(), Matrix_lerp(), Matrix_median_scale_get(), Matrix_mul(), Matrix_repr(), Matrix_richcmpr(), Matrix_rotate(), Matrix_slice(), Matrix_sub(), Matrix_to_3x3(), Matrix_to_4x4(), Matrix_to_euler(), Matrix_to_quaternion(), Matrix_to_scale(), Matrix_to_translation(), Matrix_transpose(), Quaternion_add(), Quaternion_ass_slice(), Quaternion_conjugate(), Quaternion_copy(), Quaternion_cross(), Quaternion_dot(), Quaternion_getAngle(), Quaternion_getAxisVec(), Quaternion_getMagnitude(), Quaternion_identity(), Quaternion_invert(), Quaternion_mul(), Quaternion_neg(), Quaternion_negate(), Quaternion_normalize(), Quaternion_repr(), Quaternion_richcmpr(), Quaternion_rotate(), Quaternion_rotation_difference(), Quaternion_setAngle(), Quaternion_setAxisVec(), Quaternion_slerp(), Quaternion_slice(), Quaternion_sub(), Quaternion_to_euler(), Quaternion_to_matrix(), Vector_add(), Vector_angle(), Vector_ass_slice(), Vector_copy(), Vector_cross(), Vector_div(), Vector_dot(), Vector_getLength(), Vector_getLengthSquared(), Vector_getSwizzle(), Vector_iadd(), Vector_idiv(), Vector_imul(), Vector_isub(), Vector_lerp(), Vector_mul(), Vector_neg(), Vector_negate(), Vector_normalize(), Vector_project(), Vector_reflect(), Vector_repr(), Vector_richcmpr(), Vector_rotate(), Vector_rotation_difference(), Vector_setLength(), Vector_setSwizzle(), Vector_slice(), Vector_sub(), Vector_to_2d(), Vector_to_3d(), Vector_to_4d(), Vector_to_track_quat(), and Vector_to_tuple().
| #define BaseMath_ReadIndexCallback | ( | _self, | |
| _index | |||
| ) | (((_self)->cb_user ? _BaseMathObject_ReadIndexCallback((BaseMathObject *)_self, _index):0)) |
Definition at line 105 of file mathutils.h.
Referenced by Color_item(), Euler_item(), Quaternion_item(), and vector_item_internal().
| #define BaseMath_WriteCallback | ( | _self | ) | (((_self)->cb_user ?_BaseMathObject_WriteCallback((BaseMathObject *)_self):0)) |
Definition at line 104 of file mathutils.h.
Referenced by Color_ass_slice(), Color_iadd(), Color_idiv(), Color_imul(), Color_isub(), Color_setChannelHSV(), Color_setHSV(), Euler_ass_slice(), Euler_make_compatible(), Euler_rotate(), Euler_rotate_axis(), Euler_setOrder(), Euler_zero(), mathutils_matrix_vector_set(), mathutils_matrix_vector_set_index(), Matrix_ass_item(), Matrix_ass_slice(), Matrix_identity(), Matrix_invert(), Matrix_rotate(), Matrix_transpose(), Matrix_zero(), Quaternion_ass_slice(), Quaternion_conjugate(), Quaternion_identity(), Quaternion_invert(), Quaternion_negate(), Quaternion_normalize(), Quaternion_rotate(), Quaternion_setAngle(), Quaternion_setAxisVec(), Vector_ass_slice(), Vector_iadd(), Vector_idiv(), Vector_imul(), Vector_isub(), Vector_negate(), Vector_normalize(), Vector_rotate(), Vector_setLength(), Vector_setSwizzle(), and Vector_zero().
| #define BaseMath_WriteIndexCallback | ( | _self, | |
| _index | |||
| ) | (((_self)->cb_user ? _BaseMathObject_WriteIndexCallback((BaseMathObject *)_self, _index):0)) |
Definition at line 106 of file mathutils.h.
Referenced by Color_ass_item(), Euler_ass_item(), Quaternion_ass_item(), and vector_ass_item_internal().
| #define Py_NEW 1 |
Definition at line 76 of file mathutils.h.
Referenced by C_Matrix_OrthoProjection(), C_Matrix_Rotation(), C_Matrix_Scale(), C_Matrix_Shear(), C_Matrix_Translation(), Color_add(), Color_copy(), color_mul_float(), Color_neg(), Color_new(), Color_sub(), Euler_copy(), Euler_new(), Euler_to_matrix(), Euler_to_quaternion(), M_Geometry_barycentric_transform(), M_Geometry_interpolate_bezier(), M_Geometry_intersect_line_line(), M_Geometry_intersect_line_line_2d(), M_Geometry_intersect_line_plane(), M_Geometry_intersect_line_sphere(), M_Geometry_intersect_line_sphere_2d(), M_Geometry_intersect_point_line(), M_Geometry_intersect_ray_tri(), M_Geometry_normal(), Matrix_add(), Matrix_copy(), Matrix_decompose(), Matrix_lerp(), Matrix_mul(), matrix_mul_float(), Matrix_new(), Matrix_sub(), Matrix_to_3x3(), Matrix_to_4x4(), Matrix_to_euler(), Matrix_to_quaternion(), Matrix_to_scale(), Matrix_to_translation(), newColorObject(), newColorObject_cb(), newEulerObject(), newEulerObject_cb(), newMatrixObject(), newMatrixObject_cb(), newQuaternionObject(), newQuaternionObject_cb(), newVectorObject(), newVectorObject_cb(), pyrna_math_object_from_array(), pyrna_param_to_py(), quat_mul_float(), Quaternion_add(), Quaternion_copy(), Quaternion_cross(), Quaternion_getAxisVec(), Quaternion_mul(), Quaternion_neg(), Quaternion_new(), Quaternion_rotation_difference(), Quaternion_slerp(), Quaternion_sub(), Quaternion_to_euler(), Quaternion_to_matrix(), Vector_add(), Vector_copy(), Vector_cross(), Vector_div(), Vector_getSwizzle(), Vector_lerp(), Vector_mul(), vector_mul_float(), Vector_neg(), Vector_new(), Vector_project(), Vector_reflect(), Vector_rotation_difference(), Vector_sub(), Vector_to_2d(), Vector_to_3d(), Vector_to_4d(), and Vector_to_track_quat().
| #define Py_WRAP 2 |
Definition at line 77 of file mathutils.h.
Referenced by BaseMathObject_dealloc(), BaseMathObject_getWrapped(), Matrix_resize_4x4(), newColorObject(), newEulerObject(), newMatrixObject(), newQuaternionObject(), newVectorObject(), Vector_resize_2d(), Vector_resize_3d(), and Vector_resize_4d().
| typedef int(* BaseMathCheckFunc)(BaseMathObject *) |
Definition at line 81 of file mathutils.h.
| typedef int(* BaseMathGetFunc)(BaseMathObject *, int) |
Definition at line 82 of file mathutils.h.
| typedef int(* BaseMathGetIndexFunc)(BaseMathObject *, int, int) |
Definition at line 84 of file mathutils.h.
| typedef int(* BaseMathSetFunc)(BaseMathObject *, int) |
Definition at line 83 of file mathutils.h.
| typedef int(* BaseMathSetIndexFunc)(BaseMathObject *, int, int) |
Definition at line 85 of file mathutils.h.
| typedef struct Mathutils_Callback Mathutils_Callback |
Definition at line 79 of file mathutils.h.
| int _BaseMathObject_ReadCallback | ( | BaseMathObject * | self | ) |
Definition at line 233 of file mathutils.c.
References Mathutils_Callback::get.
| int _BaseMathObject_ReadIndexCallback | ( | BaseMathObject * | self, |
| int | index | ||
| ) |
Definition at line 261 of file mathutils.c.
References Mathutils_Callback::get_index.
| int _BaseMathObject_WriteCallback | ( | BaseMathObject * | self | ) |
Definition at line 247 of file mathutils.c.
References Mathutils_Callback::set.
| int _BaseMathObject_WriteIndexCallback | ( | BaseMathObject * | self, |
| int | index | ||
| ) |
Definition at line 275 of file mathutils.c.
References Mathutils_Callback::set_index.
| int BaseMathObject_clear | ( | BaseMathObject * | self | ) |
Definition at line 310 of file mathutils.c.
Referenced by BaseMathObject_dealloc().
| void BaseMathObject_dealloc | ( | BaseMathObject * | self | ) |
Definition at line 316 of file mathutils.c.
References BaseMathObject_clear(), and Py_WRAP.
| PyObject* BaseMathObject_getOwner | ( | BaseMathObject * | self, |
| void * | |||
| ) |
| PyObject* BaseMathObject_getWrapped | ( | BaseMathObject * | self, |
| void * | |||
| ) |
| int BaseMathObject_traverse | ( | BaseMathObject * | self, |
| visitproc | visit, | ||
| void * | arg | ||
| ) |
Definition at line 304 of file mathutils.c.
| int column_vector_multiplication | ( | float | rvec[4], |
| VectorObject * | vec, | ||
| MatrixObject * | mat | ||
| ) |
Referenced by Matrix_mul(), Vector_imul(), and Vector_mul().
| int EXPP_FloatsAreEqual | ( | float | A, |
| float | B, | ||
| int | floatSteps | ||
| ) |
Definition at line 185 of file mathutils.c.
References assert, KDL::diff(), SIGNMASK, and rna_array::test.
Referenced by EXPP_VectorsAreEqual(), Quaternion_getAxisVec(), and Quaternion_setAngle().
| int EXPP_VectorsAreEqual | ( | float * | vecA, |
| float * | vecB, | ||
| int | size, | ||
| int | floatSteps | ||
| ) |
Definition at line 202 of file mathutils.c.
References EXPP_FloatsAreEqual(), and size().
Referenced by Color_richcmpr(), Euler_richcmpr(), Matrix_richcmpr(), Quaternion_richcmpr(), and Vector_richcmpr().
| int mathutils_any_to_rotmat | ( | float | rmat[3][3], |
| PyObject * | value, | ||
| const char * | error_prefix | ||
| ) |
Definition at line 130 of file mathutils.c.
References BaseMath_ReadCallback, EulerObject_Check, eulO_to_mat3(), matrix_as_3x3(), MatrixObject_Check, normalize_m3(), normalize_qt_qt(), quat_to_mat3(), and QuaternionObject_Check.
Referenced by Euler_rotate(), Matrix_rotate(), Quaternion_rotate(), and Vector_rotate().
| int mathutils_array_parse | ( | float * | array, |
| int | array_min, | ||
| int | array_max, | ||
| PyObject * | value, | ||
| const char * | error_prefix | ||
| ) |
Definition at line 92 of file mathutils.c.
References BaseMath_ReadCallback, ColorObject_Check, EulerObject_Check, mathutils_array_parse_fast(), QuaternionObject_Check, size(), and VectorObject_Check.
Referenced by C_Matrix_OrthoProjection(), C_Matrix_Rotation(), C_Matrix_Scale(), C_Matrix_Shear(), C_Matrix_Translation(), Color_ass_slice(), Color_new(), Color_setHSV(), Euler_ass_slice(), Euler_make_compatible(), Euler_new(), Matrix_ass_item(), Matrix_ass_slice(), Quaternion_ass_slice(), Quaternion_cross(), Quaternion_dot(), Quaternion_new(), Quaternion_rotation_difference(), Quaternion_setAxisVec(), Quaternion_slerp(), Vector_angle(), Vector_ass_slice(), Vector_cross(), Vector_dot(), Vector_lerp(), Vector_new(), Vector_project(), Vector_reflect(), Vector_rotation_difference(), and Vector_setSwizzle().
| int Mathutils_RegisterCallback | ( | Mathutils_Callback * | cb | ) |
Definition at line 218 of file mathutils.c.
References i.
Referenced by BPY_rna_init(), and PyInit_mathutils().
| PyMODINIT_FUNC PyInit_mathutils | ( | void | ) |
Definition at line 348 of file mathutils.c.
References color_Type, euler_Type, mathutils_matrix_vector_cb, mathutils_matrix_vector_cb_index, Mathutils_RegisterCallback(), matrix_Type, NULL, PyInit_mathutils_geometry(), quaternion_Type, and vector_Type.
| char BaseMathObject_Owner_doc[] |
Definition at line 290 of file mathutils.c.
| char BaseMathObject_Wrapped_doc[] |
Definition at line 298 of file mathutils.c.