Blender V2.61 - r43446
|
#include "mathutils_Vector.h"
#include "mathutils_Matrix.h"
#include "mathutils_Quaternion.h"
#include "mathutils_Euler.h"
#include "mathutils_Color.h"
#include "mathutils_geometry.h"
#include "mathutils_noise.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_owner_get (BaseMathObject *self, void *) |
PyObject * | BaseMathObject_is_wrapped_get (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_array_parse_alloc (float **array, int array_min, 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) |
PyObject * | mathutils_dynstr_to_py (struct DynStr *ds) |
Variables | |
char | BaseMathObject_is_wrapped_doc [] |
char | BaseMathObject_owner_doc [] |
Definition in file mathutils.h.
#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 45 of file mathutils.h.
#define BaseMath_ReadCallback | ( | _self | ) | (((_self)->cb_user ? _BaseMathObject_ReadCallback((BaseMathObject *)_self):0)) |
Definition at line 108 of file mathutils.h.
Referenced by Color_add(), Color_ass_slice(), Color_channel_hsv_get(), Color_channel_hsv_set(), Color_copy(), Color_div(), Color_hsv_get(), Color_iadd(), Color_idiv(), Color_imul(), Color_isub(), Color_mul(), Color_neg(), Color_repr(), Color_richcmpr(), Color_slice(), Color_str(), Color_sub(), Euler_ass_slice(), Euler_copy(), Euler_make_compatible(), Euler_order_get(), Euler_repr(), Euler_richcmpr(), Euler_rotate(), Euler_rotate_axis(), Euler_slice(), Euler_str(), Euler_to_matrix(), Euler_to_quaternion(), M_Geometry_area_tri(), M_Geometry_distance_point_to_plane(), 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_plane_plane(), 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_array_parse_alloc(), mathutils_matrix_col_check(), mathutils_matrix_col_get(), mathutils_matrix_col_get_index(), mathutils_matrix_col_set(), mathutils_matrix_col_set_index(), mathutils_matrix_row_check(), mathutils_matrix_row_get(), mathutils_matrix_row_get_index(), mathutils_matrix_row_set(), mathutils_matrix_row_set_index(), mathutils_matrix_translation_check(), mathutils_matrix_translation_get(), mathutils_matrix_translation_get_index(), mathutils_matrix_translation_set(), mathutils_matrix_translation_set_index(), Matrix_add(), Matrix_ass_item_col(), Matrix_ass_item_row(), Matrix_ass_slice(), Matrix_copy(), Matrix_decompose(), Matrix_determinant(), Matrix_identity(), Matrix_invert(), Matrix_is_negative_get(), Matrix_is_orthogonal_get(), Matrix_item_col(), Matrix_item_row(), Matrix_lerp(), Matrix_median_scale_get(), Matrix_mul(), Matrix_repr(), Matrix_richcmpr(), Matrix_rotate(), Matrix_slice(), Matrix_str(), Matrix_sub(), Matrix_to_3x3(), Matrix_to_4x4(), Matrix_to_euler(), Matrix_to_quaternion(), Matrix_to_scale(), Matrix_to_translation(), Matrix_translation_get(), Matrix_translation_set(), Matrix_transpose(), Quaternion_add(), Quaternion_angle_get(), Quaternion_angle_set(), Quaternion_ass_slice(), Quaternion_axis_vector_get(), Quaternion_axis_vector_set(), Quaternion_conjugate(), Quaternion_copy(), Quaternion_cross(), Quaternion_dot(), Quaternion_identity(), Quaternion_invert(), Quaternion_magnitude_get(), Quaternion_mul(), Quaternion_neg(), Quaternion_negate(), Quaternion_normalize(), Quaternion_repr(), Quaternion_richcmpr(), Quaternion_rotate(), Quaternion_rotation_difference(), Quaternion_slerp(), Quaternion_slice(), Quaternion_str(), Quaternion_sub(), Quaternion_to_axis_angle(), Quaternion_to_euler(), Quaternion_to_matrix(), row_vector_multiplication(), validate_array(), Vector_add(), Vector_angle(), Vector_ass_slice(), Vector_copy(), Vector_cross(), Vector_div(), Vector_dot(), Vector_iadd(), Vector_idiv(), Vector_imul(), Vector_isub(), Vector_length_get(), Vector_length_set(), Vector_length_squared_get(), Vector_lerp(), Vector_mul(), Vector_neg(), Vector_negate(), Vector_normalize(), Vector_project(), Vector_reflect(), Vector_repr(), Vector_richcmpr(), Vector_rotate(), Vector_rotation_difference(), Vector_slice(), Vector_str(), Vector_sub(), Vector_swizzle_get(), Vector_swizzle_set(), 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 112 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 110 of file mathutils.h.
Referenced by Color_ass_slice(), Color_channel_hsv_set(), Color_hsv_set(), Color_iadd(), Color_idiv(), Color_imul(), Color_isub(), Euler_ass_slice(), Euler_make_compatible(), Euler_order_set(), Euler_rotate(), Euler_rotate_axis(), Euler_zero(), mathutils_matrix_col_set(), mathutils_matrix_col_set_index(), mathutils_matrix_row_set(), mathutils_matrix_row_set_index(), mathutils_matrix_translation_set(), mathutils_matrix_translation_set_index(), Matrix_ass_item_col(), Matrix_ass_item_row(), Matrix_ass_slice(), Matrix_identity(), Matrix_invert(), Matrix_rotate(), Matrix_translation_set(), Matrix_transpose(), Matrix_zero(), Quaternion_angle_set(), Quaternion_ass_slice(), Quaternion_axis_vector_set(), Quaternion_conjugate(), Quaternion_identity(), Quaternion_invert(), Quaternion_negate(), Quaternion_normalize(), Quaternion_rotate(), Vector_ass_slice(), Vector_iadd(), Vector_idiv(), Vector_imul(), Vector_isub(), Vector_length_set(), Vector_negate(), Vector_normalize(), Vector_rotate(), Vector_swizzle_set(), and Vector_zero().
#define BaseMath_WriteIndexCallback | ( | _self, | |
_index | |||
) | (((_self)->cb_user ? _BaseMathObject_WriteIndexCallback((BaseMathObject *)_self, _index):0)) |
Definition at line 114 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 81 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_CreatePyObject(), Color_CreatePyObject_cb(), color_mul_float(), Color_neg(), Color_new(), Color_sub(), Euler_copy(), Euler_CreatePyObject(), Euler_CreatePyObject_cb(), 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_plane_plane(), M_Geometry_intersect_point_line(), M_Geometry_intersect_ray_tri(), M_Geometry_normal(), M_Noise_cell_vector(), M_Noise_noise_vector(), M_Noise_random_unit_vector(), M_Noise_turbulence_vector(), M_Noise_voronoi(), Matrix_add(), Matrix_copy(), Matrix_CreatePyObject(), Matrix_CreatePyObject_cb(), 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(), pyrna_math_object_from_array(), pyrna_param_to_py(), quat_mul_float(), Quaternion_add(), Quaternion_axis_vector_get(), Quaternion_copy(), Quaternion_CreatePyObject(), Quaternion_CreatePyObject_cb(), Quaternion_cross(), Quaternion_mul(), Quaternion_neg(), Quaternion_new(), Quaternion_rotation_difference(), Quaternion_slerp(), Quaternion_sub(), Quaternion_to_axis_angle(), Quaternion_to_euler(), Quaternion_to_matrix(), Vector_copy(), Vector_CreatePyObject(), Vector_CreatePyObject_alloc(), Vector_CreatePyObject_cb(), Vector_cross(), Vector_mul(), Vector_new(), Vector_project(), Vector_reflect(), Vector_rotation_difference(), Vector_swizzle_get(), Vector_to_2d(), Vector_to_3d(), Vector_to_4d(), and Vector_to_track_quat().
#define Py_WRAP 2 |
Definition at line 82 of file mathutils.h.
Referenced by BaseMathObject_dealloc(), BaseMathObject_is_wrapped_get(), Color_CreatePyObject(), Euler_CreatePyObject(), Matrix_CreatePyObject(), Matrix_resize_4x4(), Quaternion_CreatePyObject(), Vector_CreatePyObject(), Vector_CreatePyObject_alloc(), Vector_resize(), Vector_resize_2d(), Vector_resize_3d(), and Vector_resize_4d().
typedef int(* BaseMathCheckFunc)(BaseMathObject *) |
Definition at line 86 of file mathutils.h.
typedef int(* BaseMathGetFunc)(BaseMathObject *, int) |
Definition at line 87 of file mathutils.h.
typedef int(* BaseMathGetIndexFunc)(BaseMathObject *, int, int) |
Definition at line 89 of file mathutils.h.
typedef int(* BaseMathSetFunc)(BaseMathObject *, int) |
Definition at line 88 of file mathutils.h.
typedef int(* BaseMathSetIndexFunc)(BaseMathObject *, int, int) |
Definition at line 90 of file mathutils.h.
typedef struct Mathutils_Callback Mathutils_Callback |
Definition at line 84 of file mathutils.h.
int _BaseMathObject_ReadCallback | ( | BaseMathObject * | self | ) |
Definition at line 304 of file mathutils.c.
References Mathutils_Callback::get.
int _BaseMathObject_ReadIndexCallback | ( | BaseMathObject * | self, |
int | index | ||
) |
Definition at line 332 of file mathutils.c.
References Mathutils_Callback::get_index.
int _BaseMathObject_WriteCallback | ( | BaseMathObject * | self | ) |
Definition at line 318 of file mathutils.c.
References Mathutils_Callback::set.
int _BaseMathObject_WriteIndexCallback | ( | BaseMathObject * | self, |
int | index | ||
) |
Definition at line 346 of file mathutils.c.
References Mathutils_Callback::set_index.
int BaseMathObject_clear | ( | BaseMathObject * | self | ) |
Definition at line 381 of file mathutils.c.
Referenced by BaseMathObject_dealloc().
void BaseMathObject_dealloc | ( | BaseMathObject * | self | ) |
Definition at line 387 of file mathutils.c.
References BaseMathObject_clear(), and Py_WRAP.
PyObject* BaseMathObject_is_wrapped_get | ( | BaseMathObject * | self, |
void * | |||
) |
PyObject* BaseMathObject_owner_get | ( | BaseMathObject * | self, |
void * | |||
) |
int BaseMathObject_traverse | ( | BaseMathObject * | self, |
visitproc | visit, | ||
void * | arg | ||
) |
Definition at line 375 of file mathutils.c.
int column_vector_multiplication | ( | float | rvec[4], |
VectorObject * | vec, | ||
MatrixObject * | mat | ||
) |
Referenced by Matrix_mul(), and Vector_imul().
int EXPP_FloatsAreEqual | ( | float | A, |
float | B, | ||
int | floatSteps | ||
) |
Definition at line 244 of file mathutils.c.
References assert, KDL::diff(), SIGNMASK, and rna_array::test.
Referenced by EXPP_VectorsAreEqual(), and quat__axis_angle_sanitize().
int EXPP_VectorsAreEqual | ( | float * | vecA, |
float * | vecB, | ||
int | size, | ||
int | floatSteps | ||
) |
Definition at line 261 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 189 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 72 of file mathutils.c.
References BaseMath_ReadCallback, ColorObject_Check, data, EulerObject_Check, mathutils_array_parse_fast(), NULL, 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_hsv_set(), Color_new(), Euler_ass_slice(), Euler_make_compatible(), Euler_new(), M_Noise_cell(), M_Noise_cell_vector(), M_Noise_fractal(), M_Noise_hetero_terrain(), M_Noise_hybrid_multi_fractal(), M_Noise_multi_fractal(), M_Noise_noise(), M_Noise_noise_vector(), M_Noise_ridged_multi_fractal(), M_Noise_turbulence(), M_Noise_turbulence_vector(), M_Noise_variable_lacunarity(), M_Noise_voronoi(), Matrix_ass_item_col(), Matrix_ass_item_row(), Matrix_ass_slice(), Matrix_translation_set(), Quaternion_ass_slice(), Quaternion_axis_vector_set(), Quaternion_cross(), Quaternion_dot(), Quaternion_new(), Quaternion_rotation_difference(), Quaternion_slerp(), Vector_angle(), Vector_cross(), Vector_project(), Vector_reflect(), Vector_rotation_difference(), and Vector_swizzle_set().
int mathutils_array_parse_alloc | ( | float ** | array, |
int | array_min, | ||
PyObject * | value, | ||
const char * | error_prefix | ||
) |
Definition at line 136 of file mathutils.c.
References BaseMath_ReadCallback, ColorObject_Check, data, EulerObject_Check, mathutils_array_parse_fast(), NULL, QuaternionObject_Check, size(), and VectorObject_Check.
Referenced by C_Vector_Repeat(), Vector_ass_slice(), Vector_dot(), Vector_lerp(), and Vector_new().
PyObject* mathutils_dynstr_to_py | ( | struct DynStr * | ds | ) |
Definition at line 272 of file mathutils.c.
References BLI_dynstr_free(), BLI_dynstr_get_cstring_ex(), and BLI_dynstr_get_len().
Referenced by Color_str(), Euler_str(), Matrix_str(), Quaternion_str(), and Vector_str().
int Mathutils_RegisterCallback | ( | Mathutils_Callback * | cb | ) |
Definition at line 289 of file mathutils.c.
References i.
Referenced by BPY_rna_init(), and PyInit_mathutils().
PyMODINIT_FUNC PyInit_mathutils | ( | void | ) |
Definition at line 419 of file mathutils.c.
References color_Type, euler_Type, mathutils_matrix_col_cb, mathutils_matrix_col_cb_index, mathutils_matrix_row_cb, mathutils_matrix_row_cb_index, mathutils_matrix_translation_cb, mathutils_matrix_translation_cb_index, Mathutils_RegisterCallback(), matrix_access_Type, matrix_Type, NULL, PyInit_mathutils_geometry(), PyInit_mathutils_noise(), quaternion_Type, and vector_Type.
Definition at line 369 of file mathutils.c.
char BaseMathObject_owner_doc[] |
Definition at line 361 of file mathutils.c.