Blender V2.61 - r43446
|
#include <Python.h>
#include "mathutils.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_dynstr.h"
Go to the source code of this file.
Defines | |
#define | EULER_SIZE 3 |
Functions | |
static PyObject * | Euler_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
static const char * | euler_order_str (EulerObject *self) |
short | euler_order_from_string (const char *str, const char *error_prefix) |
static PyObject * | Euler_ToTupleExt (EulerObject *self, int ndigits) |
PyDoc_STRVAR (Euler_to_quaternion_doc,".. method:: to_quaternion()\n""\n"" Return a quaternion representation of the euler.\n""\n"" :return: Quaternion representation of the euler.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Euler_to_quaternion (EulerObject *self) |
PyDoc_STRVAR (Euler_to_matrix_doc,".. method:: to_matrix()\n""\n"" Return a matrix representation of the euler.\n""\n"" :return: A 3x3 roation matrix representation of the euler.\n"" :rtype: :class:`Matrix`\n") | |
static PyObject * | Euler_to_matrix (EulerObject *self) |
PyDoc_STRVAR (Euler_zero_doc,".. method:: zero()\n""\n"" Set all values to zero.\n") | |
static PyObject * | Euler_zero (EulerObject *self) |
PyDoc_STRVAR (Euler_rotate_axis_doc,".. method:: rotate_axis(axis, angle)\n""\n"" Rotates the euler a certain amount and returning a unique euler rotation\n"" (no 720 degree pitches).\n""\n"" :arg axis: single character in ['X, 'Y', 'Z'].\n"" :type axis: string\n"" :arg angle: angle in radians.\n"" :type angle: float\n") | |
static PyObject * | Euler_rotate_axis (EulerObject *self, PyObject *args) |
PyDoc_STRVAR (Euler_rotate_doc,".. method:: rotate(other)\n""\n"" Rotates the euler a by another mathutils value.\n""\n"" :arg other: rotation component of mathutils value\n"" :type other: :class:`Euler`, :class:`Quaternion` or :class:`Matrix`\n") | |
static PyObject * | Euler_rotate (EulerObject *self, PyObject *value) |
PyDoc_STRVAR (Euler_make_compatible_doc,".. method:: make_compatible(other)\n""\n"" Make this euler compatible with another,\n"" so interpolating between them works as intended.\n""\n"" .. note:: the rotation order is not taken into account for this function.\n") | |
static PyObject * | Euler_make_compatible (EulerObject *self, PyObject *value) |
PyDoc_STRVAR (Euler_copy_doc,".. function:: copy()\n""\n"" Returns a copy of this euler.\n""\n"" :return: A copy of the euler.\n"" :rtype: :class:`Euler`\n""\n"" .. note:: use this to get a copy of a wrapped euler with\n"" no reference to the original data.\n") | |
static PyObject * | Euler_copy (EulerObject *self) |
static PyObject * | Euler_repr (EulerObject *self) |
static PyObject * | Euler_str (EulerObject *self) |
static PyObject * | Euler_richcmpr (PyObject *a, PyObject *b, int op) |
static int | Euler_len (EulerObject *UNUSED(self)) |
static PyObject * | Euler_item (EulerObject *self, int i) |
static int | Euler_ass_item (EulerObject *self, int i, PyObject *value) |
static PyObject * | Euler_slice (EulerObject *self, int begin, int end) |
static int | Euler_ass_slice (EulerObject *self, int begin, int end, PyObject *seq) |
static PyObject * | Euler_subscript (EulerObject *self, PyObject *item) |
static int | Euler_ass_subscript (EulerObject *self, PyObject *item, PyObject *value) |
PyDoc_STRVAR (Euler_axis_doc,"Euler axis angle in radians.\n\n:type: float") | |
static PyObject * | Euler_axis_get (EulerObject *self, void *type) |
static int | Euler_axis_set (EulerObject *self, PyObject *value, void *type) |
PyDoc_STRVAR (Euler_order_doc,"Euler rotation order.\n\n:type: string in ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX']") | |
static PyObject * | Euler_order_get (EulerObject *self, void *UNUSED(closure)) |
static int | Euler_order_set (EulerObject *self, PyObject *value, void *UNUSED(closure)) |
PyDoc_STRVAR (euler_doc,"This object gives access to Eulers in Blender.") | |
PyObject * | Euler_CreatePyObject (float *eul, short order, int type, PyTypeObject *base_type) |
PyObject * | Euler_CreatePyObject_cb (PyObject *cb_user, short order, int cb_type, int cb_subtype) |
Variables | |
static PySequenceMethods | Euler_SeqMethods |
static PyMappingMethods | Euler_AsMapping |
static PyGetSetDef | Euler_getseters [] |
static struct PyMethodDef | Euler_methods [] |
PyTypeObject | euler_Type |
Definition in file mathutils_Euler.c.
#define EULER_SIZE 3 |
Definition at line 41 of file mathutils_Euler.c.
Referenced by Euler_ass_item(), Euler_ass_slice(), Euler_ass_subscript(), Euler_CreatePyObject(), Euler_item(), Euler_len(), Euler_make_compatible(), Euler_new(), Euler_richcmpr(), Euler_slice(), Euler_subscript(), and Euler_ToTupleExt().
static int Euler_ass_item | ( | EulerObject * | self, |
int | i, | ||
PyObject * | value | ||
) | [static] |
Definition at line 400 of file mathutils_Euler.c.
References BaseMath_WriteIndexCallback, EULER_SIZE, and i.
Referenced by Euler_ass_subscript(), and Euler_axis_set().
static int Euler_ass_slice | ( | EulerObject * | self, |
int | begin, | ||
int | end, | ||
PyObject * | seq | ||
) | [static] |
Definition at line 451 of file mathutils_Euler.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, CLAMP(), EULER_SIZE, i, mathutils_array_parse(), MIN2, and size().
Referenced by Euler_ass_subscript().
static int Euler_ass_subscript | ( | EulerObject * | self, |
PyObject * | item, | ||
PyObject * | value | ||
) | [static] |
Definition at line 519 of file mathutils_Euler.c.
References Euler_ass_item(), Euler_ass_slice(), EULER_SIZE, i, and step().
static PyObject* Euler_axis_get | ( | EulerObject * | self, |
void * | type | ||
) | [static] |
Definition at line 576 of file mathutils_Euler.c.
References Euler_item(), and GET_INT_FROM_POINTER.
static int Euler_axis_set | ( | EulerObject * | self, |
PyObject * | value, | ||
void * | type | ||
) | [static] |
Definition at line 581 of file mathutils_Euler.c.
References Euler_ass_item(), and GET_INT_FROM_POINTER.
static PyObject* Euler_copy | ( | EulerObject * | self | ) | [static] |
Definition at line 295 of file mathutils_Euler.c.
References BaseMath_ReadCallback, Euler_CreatePyObject(), NULL, and Py_NEW.
PyObject* Euler_CreatePyObject | ( | float * | eul, |
short | order, | ||
int | type, | ||
PyTypeObject * | base_type | ||
) |
Definition at line 698 of file mathutils_Euler.c.
References copy_v3_v3(), EULER_SIZE, NULL, Py_NEW, Py_WRAP, and zero_v3().
Referenced by Euler_copy(), Euler_CreatePyObject_cb(), Euler_new(), Matrix_to_euler(), pyrna_math_object_from_array(), and Quaternion_to_euler().
PyObject* Euler_CreatePyObject_cb | ( | PyObject * | cb_user, |
short | order, | ||
int | cb_type, | ||
int | cb_subtype | ||
) |
Definition at line 735 of file mathutils_Euler.c.
References Euler_CreatePyObject(), and Py_NEW.
Referenced by pyrna_math_object_from_array().
static PyObject* Euler_item | ( | EulerObject * | self, |
int | i | ||
) | [static] |
Definition at line 381 of file mathutils_Euler.c.
References BaseMath_ReadIndexCallback, EULER_SIZE, i, and NULL.
Referenced by Euler_axis_get(), and Euler_subscript().
static int Euler_len | ( | EulerObject * | UNUSEDself | ) | [static] |
Definition at line 375 of file mathutils_Euler.c.
References EULER_SIZE.
static PyObject* Euler_make_compatible | ( | EulerObject * | self, |
PyObject * | value | ||
) | [static] |
Definition at line 261 of file mathutils_Euler.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, compatible_eul(), EULER_SIZE, mathutils_array_parse(), and NULL.
static PyObject* Euler_new | ( | PyTypeObject * | type, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Definition at line 45 of file mathutils_Euler.c.
References Euler_CreatePyObject(), euler_order_from_string(), EULER_ORDER_XYZ, EULER_SIZE, mathutils_array_parse(), NULL, and Py_NEW.
short euler_order_from_string | ( | const char * | str, |
const char * | error_prefix | ||
) |
Definition at line 85 of file mathutils_Euler.c.
References EULER_ORDER_XYZ, EULER_ORDER_XZY, EULER_ORDER_YXZ, EULER_ORDER_YZX, EULER_ORDER_ZXY, and EULER_ORDER_ZYX.
Referenced by Euler_new(), Euler_order_set(), Matrix_to_euler(), and Quaternion_to_euler().
static PyObject* Euler_order_get | ( | EulerObject * | self, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 591 of file mathutils_Euler.c.
References BaseMath_ReadCallback, euler_order_str(), and NULL.
static int Euler_order_set | ( | EulerObject * | self, |
PyObject * | value, | ||
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 599 of file mathutils_Euler.c.
References BaseMath_WriteCallback, and euler_order_from_string().
static const char* euler_order_str | ( | EulerObject * | self | ) | [static] |
Definition at line 79 of file mathutils_Euler.c.
References EULER_ORDER_XYZ.
Referenced by Euler_order_get(), Euler_repr(), and Euler_str().
static PyObject* Euler_repr | ( | EulerObject * | self | ) | [static] |
Definition at line 306 of file mathutils_Euler.c.
References BaseMath_ReadCallback, euler_order_str(), Euler_ToTupleExt(), and NULL.
static PyObject* Euler_richcmpr | ( | PyObject * | a, |
PyObject * | b, | ||
int | op | ||
) | [static] |
Definition at line 336 of file mathutils_Euler.c.
References BaseMath_ReadCallback, EULER_SIZE, EulerObject_Check, EXPP_VectorsAreEqual(), NULL, and EulerObject::order.
static PyObject* Euler_rotate | ( | EulerObject * | self, |
PyObject * | value | ||
) | [static] |
Definition at line 234 of file mathutils_Euler.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, eulO_to_mat3(), mat3_to_compatible_eulO(), mathutils_any_to_rotmat(), mul_m3_m3m3(), and NULL.
static PyObject* Euler_rotate_axis | ( | EulerObject * | self, |
PyObject * | args | ||
) | [static] |
Definition at line 196 of file mathutils_Euler.c.
References angle(), BaseMath_ReadCallback, BaseMath_WriteCallback, ELEM3, NULL, and rotate_eulO().
static PyObject* Euler_slice | ( | EulerObject * | self, |
int | begin, | ||
int | end | ||
) | [static] |
Definition at line 429 of file mathutils_Euler.c.
References BaseMath_ReadCallback, CLAMP(), EULER_SIZE, MIN2, and NULL.
Referenced by Euler_subscript().
static PyObject* Euler_str | ( | EulerObject * | self | ) | [static] |
Definition at line 321 of file mathutils_Euler.c.
References BaseMath_ReadCallback, BLI_dynstr_appendf(), BLI_dynstr_new(), euler_order_str(), mathutils_dynstr_to_py(), and NULL.
static PyObject* Euler_subscript | ( | EulerObject * | self, |
PyObject * | item | ||
) | [static] |
Definition at line 481 of file mathutils_Euler.c.
References Euler_item(), EULER_SIZE, Euler_slice(), i, NULL, and step().
static PyObject* Euler_to_matrix | ( | EulerObject * | self | ) | [static] |
Definition at line 158 of file mathutils_Euler.c.
References BaseMath_ReadCallback, eulO_to_mat3(), Matrix_CreatePyObject(), NULL, and Py_NEW.
static PyObject* Euler_to_quaternion | ( | EulerObject * | self | ) | [static] |
Definition at line 137 of file mathutils_Euler.c.
References BaseMath_ReadCallback, eulO_to_quat(), NULL, Py_NEW, and Quaternion_CreatePyObject().
static PyObject* Euler_ToTupleExt | ( | EulerObject * | self, |
int | ndigits | ||
) | [static] |
Definition at line 105 of file mathutils_Euler.c.
References double_round(), EULER_SIZE, and i.
Referenced by Euler_repr().
static PyObject* Euler_zero | ( | EulerObject * | self | ) | [static] |
Definition at line 175 of file mathutils_Euler.c.
References BaseMath_WriteCallback, NULL, and zero_v3().
PyDoc_STRVAR | ( | Euler_axis_doc | , |
"Euler axis angle in radians.\n\n:type: float" | |||
) |
PyDoc_STRVAR | ( | Euler_rotate_axis_doc | , |
".. method:: rotate_axis(axis, angle)\n""\n"" Rotates the euler a certain amount and returning a unique euler rotation\n"" (no 720 degree pitches).\n""\n"" :arg axis: single character in .\n"" :type axis: string\n"" :arg angle: angle in radians.\n"" :type angle: float\n" | ['X, 'Y', 'Z'] | ||
) |
PyDoc_STRVAR | ( | euler_doc | , |
"This object gives access to Eulers in Blender." | |||
) |
PyDoc_STRVAR | ( | Euler_to_matrix_doc | , |
".. method:: to_matrix()\n""\n"" Return a matrix representation of the euler.\n""\n"" :return: A 3x3 roation matrix representation of the euler.\n"" :rtype: :class:`Matrix`\n" | |||
) |
PyDoc_STRVAR | ( | Euler_make_compatible_doc | , |
".. method:: make_compatible(other)\n""\n"" Make this euler compatible with | another, | ||
\n""so interpolating between them works as intended.\n""\n""..note::the rotation order is not taken into account for this function.\n" | |||
) |
PyDoc_STRVAR | ( | Euler_order_doc | , |
"Euler rotation order.\n\n:type: string in " | ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'] | ||
) |
PyDoc_STRVAR | ( | Euler_zero_doc | , |
".. method:: zero()\n""\n"" Set all values to zero.\n" | |||
) |
PyDoc_STRVAR | ( | Euler_rotate_doc | , |
".. method:: rotate(other)\n""\n"" Rotates the euler a by another mathutils value.\n""\n"" :arg other: rotation component of mathutils value\n"" :type other: :class:`Euler` | , | ||
:class:`Quaternion`or:class:`Matrix`\n" | |||
) |
PyDoc_STRVAR | ( | Euler_copy_doc | , |
".. function:: copy()\n""\n"" Returns a copy of this euler.\n""\n"" :return: A copy of the euler.\n"" :rtype: :class:`Euler`\n""\n"" .. note:: use this to get a copy of a wrapped euler with\n"" no reference to the original data.\n" | |||
) |
PyDoc_STRVAR | ( | Euler_to_quaternion_doc | , |
".. method:: to_quaternion()\n""\n"" Return a quaternion representation of the euler.\n""\n"" :return: Quaternion representation of the euler.\n"" :rtype: :class:`Quaternion`\n" | |||
) |
PyMappingMethods Euler_AsMapping [static] |
{ (lenfunc)Euler_len, (binaryfunc)Euler_subscript, (objobjargproc)Euler_ass_subscript }
Definition at line 565 of file mathutils_Euler.c.
PyGetSetDef Euler_getseters[] [static] |
{ {(char *)"x", (getter)Euler_axis_get, (setter)Euler_axis_set, Euler_axis_doc, (void *)0}, {(char *)"y", (getter)Euler_axis_get, (setter)Euler_axis_set, Euler_axis_doc, (void *)1}, {(char *)"z", (getter)Euler_axis_get, (setter)Euler_axis_set, Euler_axis_doc, (void *)2}, {(char *)"order", (getter)Euler_order_get, (setter)Euler_order_set, Euler_order_doc, (void *)NULL}, {(char *)"is_wrapped", (getter)BaseMathObject_is_wrapped_get, (setter)NULL, BaseMathObject_is_wrapped_doc, NULL}, {(char *)"owner", (getter)BaseMathObject_owner_get, (setter)NULL, BaseMathObject_owner_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} }
Definition at line 615 of file mathutils_Euler.c.
struct PyMethodDef Euler_methods[] [static] |
{ {"zero", (PyCFunction) Euler_zero, METH_NOARGS, Euler_zero_doc}, {"to_matrix", (PyCFunction) Euler_to_matrix, METH_NOARGS, Euler_to_matrix_doc}, {"to_quaternion", (PyCFunction) Euler_to_quaternion, METH_NOARGS, Euler_to_quaternion_doc}, {"rotate_axis", (PyCFunction) Euler_rotate_axis, METH_VARARGS, Euler_rotate_axis_doc}, {"rotate", (PyCFunction) Euler_rotate, METH_O, Euler_rotate_doc}, {"make_compatible", (PyCFunction) Euler_make_compatible, METH_O, Euler_make_compatible_doc}, {"__copy__", (PyCFunction) Euler_copy, METH_NOARGS, Euler_copy_doc}, {"copy", (PyCFunction) Euler_copy, METH_NOARGS, Euler_copy_doc}, {NULL, NULL, 0, NULL} }
Definition at line 628 of file mathutils_Euler.c.
PySequenceMethods Euler_SeqMethods [static] |
{ (lenfunc) Euler_len, (binaryfunc) NULL, (ssizeargfunc) NULL, (ssizeargfunc) Euler_item, (ssizessizeargfunc) NULL, (ssizeobjargproc) Euler_ass_item, (ssizessizeobjargproc) NULL, (objobjproc) NULL, (binaryfunc) NULL, (ssizeargfunc) NULL, }
Definition at line 552 of file mathutils_Euler.c.
PyTypeObject euler_Type |
Definition at line 644 of file mathutils_Euler.c.
Referenced by Matrix_to_euler(), PyInit_mathutils(), and Quaternion_to_euler().