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 | QUAT_SIZE 4 |
Functions | |
static PyObject * | quat__apply_to_copy (PyNoArgsFunction quat_func, QuaternionObject *self) |
static void | quat__axis_angle_sanitize (float axis[3], float *angle) |
static PyObject * | Quaternion_copy (QuaternionObject *self) |
static PyObject * | Quaternion_to_tuple_ext (QuaternionObject *self, int ndigits) |
PyDoc_STRVAR (Quaternion_to_euler_doc,".. method:: to_euler(order, euler_compat)\n""\n"" Return Euler representation of the quaternion.\n""\n"" :arg order: Optional rotation order argument in\n"" ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'].\n"" :type order: string\n"" :arg euler_compat: Optional euler argument the new euler will be made\n"" compatible with (no axis flipping between them).\n"" Useful for converting a series of matrices to animation curves.\n"" :type euler_compat: :class:`Euler`\n"" :return: Euler representation of the quaternion.\n"" :rtype: :class:`Euler`\n") | |
static PyObject * | Quaternion_to_euler (QuaternionObject *self, PyObject *args) |
PyDoc_STRVAR (Quaternion_to_matrix_doc,".. method:: to_matrix()\n""\n"" Return a matrix representation of the quaternion.\n""\n"" :return: A 3x3 rotation matrix representation of the quaternion.\n"" :rtype: :class:`Matrix`\n") | |
static PyObject * | Quaternion_to_matrix (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_to_axis_angle_doc,".. method:: to_axis_angle()\n""\n"" Return the axis, angle representation of the quaternion.\n""\n"" :return: axis, angle.\n"" :rtype: (:class:`Vector`, float) pair\n") | |
static PyObject * | Quaternion_to_axis_angle (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_cross_doc,".. method:: cross(other)\n""\n"" Return the cross product of this quaternion and another.\n""\n"" :arg other: The other quaternion to perform the cross product with.\n"" :type other: :class:`Quaternion`\n"" :return: The cross product.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_cross (QuaternionObject *self, PyObject *value) |
PyDoc_STRVAR (Quaternion_dot_doc,".. method:: dot(other)\n""\n"" Return the dot product of this quaternion and another.\n""\n"" :arg other: The other quaternion to perform the dot product with.\n"" :type other: :class:`Quaternion`\n"" :return: The dot product.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_dot (QuaternionObject *self, PyObject *value) |
PyDoc_STRVAR (Quaternion_rotation_difference_doc,".. function:: rotation_difference(other)\n""\n"" Returns a quaternion representing the rotational difference.\n""\n"" :arg other: second quaternion.\n"" :type other: :class:`Quaternion`\n"" :return: the rotational difference between the two quat rotations.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_rotation_difference (QuaternionObject *self, PyObject *value) |
PyDoc_STRVAR (Quaternion_slerp_doc,".. function:: slerp(other, factor)\n""\n"" Returns the interpolation of two quaternions.\n""\n"" :arg other: value to interpolate with.\n"" :type other: :class:`Quaternion`\n"" :arg factor: The interpolation value in [0.0, 1.0].\n"" :type factor: float\n"" :return: The interpolated rotation.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_slerp (QuaternionObject *self, PyObject *args) |
PyDoc_STRVAR (Quaternion_rotate_doc,".. method:: rotate(other)\n""\n"" Rotates the quaternion 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 * | Quaternion_rotate (QuaternionObject *self, PyObject *value) |
PyDoc_STRVAR (Quaternion_normalize_doc,".. function:: normalize()\n""\n"" Normalize the quaternion.\n") | |
static PyObject * | Quaternion_normalize (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_normalized_doc,".. function:: normalized()\n""\n"" Return a new normalized quaternion.\n""\n"" :return: a normalized copy.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_normalized (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_invert_doc,".. function:: invert()\n""\n"" Set the quaternion to its inverse.\n") | |
static PyObject * | Quaternion_invert (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_inverted_doc,".. function:: inverted()\n""\n"" Return a new, inverted quaternion.\n""\n"" :return: the inverted value.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_inverted (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_identity_doc,".. function:: identity()\n""\n"" Set the quaternion to an identity quaternion.\n""\n"" :return: an instance of itself.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_identity (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_negate_doc,".. function:: negate()\n""\n"" Set the quaternion to its negative.\n""\n"" :return: an instance of itself.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_negate (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_conjugate_doc,".. function:: conjugate()\n""\n"" Set the quaternion to its conjugate (negate x, y, z).\n") | |
static PyObject * | Quaternion_conjugate (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_conjugated_doc,".. function:: conjugated()\n""\n"" Return a new conjugated quaternion.\n""\n"" :return: a new quaternion.\n"" :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_conjugated (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_copy_doc,".. function:: copy()\n""\n"" Returns a copy of this quaternion.\n""\n"" :return: A copy of the quaternion.\n"" :rtype: :class:`Quaternion`\n""\n"" .. note:: use this to get a copy of a wrapped quaternion with\n"" no reference to the original data.\n") | |
static PyObject * | Quaternion_repr (QuaternionObject *self) |
static PyObject * | Quaternion_str (QuaternionObject *self) |
static PyObject * | Quaternion_richcmpr (PyObject *a, PyObject *b, int op) |
static int | Quaternion_len (QuaternionObject *UNUSED(self)) |
static PyObject * | Quaternion_item (QuaternionObject *self, int i) |
static int | Quaternion_ass_item (QuaternionObject *self, int i, PyObject *ob) |
static PyObject * | Quaternion_slice (QuaternionObject *self, int begin, int end) |
static int | Quaternion_ass_slice (QuaternionObject *self, int begin, int end, PyObject *seq) |
static PyObject * | Quaternion_subscript (QuaternionObject *self, PyObject *item) |
static int | Quaternion_ass_subscript (QuaternionObject *self, PyObject *item, PyObject *value) |
static PyObject * | Quaternion_add (PyObject *q1, PyObject *q2) |
static PyObject * | Quaternion_sub (PyObject *q1, PyObject *q2) |
static PyObject * | quat_mul_float (QuaternionObject *quat, const float scalar) |
static PyObject * | Quaternion_mul (PyObject *q1, PyObject *q2) |
static PyObject * | Quaternion_neg (QuaternionObject *self) |
PyDoc_STRVAR (Quaternion_axis_doc,"Quaternion axis value.\n\n:type: float") | |
static PyObject * | Quaternion_axis_get (QuaternionObject *self, void *type) |
static int | Quaternion_axis_set (QuaternionObject *self, PyObject *value, void *type) |
PyDoc_STRVAR (Quaternion_magnitude_doc,"Size of the quaternion (readonly).\n\n:type: float") | |
static PyObject * | Quaternion_magnitude_get (QuaternionObject *self, void *UNUSED(closure)) |
PyDoc_STRVAR (Quaternion_angle_doc,"Angle of the quaternion.\n\n:type: float") | |
static PyObject * | Quaternion_angle_get (QuaternionObject *self, void *UNUSED(closure)) |
static int | Quaternion_angle_set (QuaternionObject *self, PyObject *value, void *UNUSED(closure)) |
PyDoc_STRVAR (Quaternion_axis_vector_doc,"Quaternion axis as a vector.\n\n:type: :class:`Vector`") | |
static PyObject * | Quaternion_axis_vector_get (QuaternionObject *self, void *UNUSED(closure)) |
static int | Quaternion_axis_vector_set (QuaternionObject *self, PyObject *value, void *UNUSED(closure)) |
static PyObject * | Quaternion_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
PyDoc_STRVAR (quaternion_doc,"This object gives access to Quaternions in Blender.") | |
PyObject * | Quaternion_CreatePyObject (float *quat, int type, PyTypeObject *base_type) |
PyObject * | Quaternion_CreatePyObject_cb (PyObject *cb_user, int cb_type, int cb_subtype) |
Variables | |
static PySequenceMethods | Quaternion_SeqMethods |
static PyMappingMethods | Quaternion_AsMapping |
static PyNumberMethods | Quaternion_NumMethods |
static struct PyMethodDef | Quaternion_methods [] |
static PyGetSetDef | Quaternion_getseters [] |
PyTypeObject | quaternion_Type |
Definition in file mathutils_Quaternion.c.
#define QUAT_SIZE 4 |
Definition at line 40 of file mathutils_Quaternion.c.
Referenced by Quaternion_add(), Quaternion_ass_item(), Quaternion_ass_slice(), Quaternion_ass_subscript(), Quaternion_CreatePyObject(), Quaternion_cross(), Quaternion_dot(), Quaternion_item(), Quaternion_len(), Quaternion_mul(), Quaternion_neg(), Quaternion_new(), Quaternion_richcmpr(), Quaternion_rotation_difference(), Quaternion_slerp(), Quaternion_slice(), Quaternion_sub(), Quaternion_subscript(), and Quaternion_to_tuple_ext().
PyDoc_STRVAR | ( | Quaternion_to_euler_doc | , |
".. method:: to_euler(order, euler_compat)\n""\n"" Return Euler representation of the quaternion.\n""\n"" :arg order: Optional rotation order argument in\n"" .\n"" :type order: string\n"" :arg euler_compat: Optional euler argument the new euler will be made\n"" compatible with (no axis flipping between them).\n"" Useful for converting a series of matrices to animation curves.\n"" :type euler_compat: :class:`Euler`\n"" :return: Euler representation of the quaternion.\n"" :rtype: :class:`Euler`\n" | ['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'] | ||
) |
PyDoc_STRVAR | ( | Quaternion_to_axis_angle_doc | , |
".. method:: to_axis_angle()\n""\n"" Return the | axis, | ||
angle representation of the quaternion.\n""\n"":return:axis | , | ||
angle.\n"":rtype:(:class:`Vector`, float) pair\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_slerp_doc | , |
".. function:: slerp(other, factor)\n""\n"" Returns the interpolation of two quaternions.\n""\n"" :arg other: value to interpolate with.\n"" :type other: :class:`Quaternion`\n"" :arg factor: The interpolation value in .\n"" :type factor: float\n"" :return: The interpolated rotation.\n"" :rtype: :class:`Quaternion`\n" | [0.0, 1.0] | ||
) |
PyDoc_STRVAR | ( | Quaternion_conjugate_doc | , |
".. function:: conjugate()\n""\n"" Set the quaternion to its conjugate (negate x, y, z).\n" | |||
) |
PyDoc_STRVAR | ( | quaternion_doc | , |
"This object gives access to Quaternions in Blender." | |||
) |
PyDoc_STRVAR | ( | Quaternion_conjugated_doc | , |
".. function:: conjugated()\n""\n"" Return a new conjugated quaternion.\n""\n"" :return: a new quaternion.\n"" :rtype: :class:`Quaternion`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_rotate_doc | , |
".. method:: rotate(other)\n""\n"" Rotates the quaternion 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 | ( | Quaternion_copy_doc | , |
".. function:: copy()\n""\n"" Returns a copy of this quaternion.\n""\n"" :return: A copy of the quaternion.\n"" :rtype: :class:`Quaternion`\n""\n"" .. note:: use this to get a copy of a wrapped quaternion with\n"" no reference to the original data.\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_cross_doc | , |
".. method:: cross(other)\n""\n"" Return the cross product of this quaternion and another.\n""\n"" :arg other: The other quaternion to perform the cross product with.\n"" :type other: :class:`Quaternion`\n"" :return: The cross product.\n"" :rtype: :class:`Quaternion`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_normalize_doc | , |
".. function:: normalize()\n""\n"" Normalize the quaternion.\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_normalized_doc | , |
".. function:: normalized()\n""\n"" Return a new normalized quaternion.\n""\n"" :return: a normalized copy.\n"" :rtype: :class:`Quaternion`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_to_matrix_doc | , |
".. method:: to_matrix()\n""\n"" Return a matrix representation of the quaternion.\n""\n"" :return: A 3x3 rotation matrix representation of the quaternion.\n"" :rtype: :class:`Matrix`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_dot_doc | , |
".. method:: dot(other)\n""\n"" Return the dot product of this quaternion and another.\n""\n"" :arg other: The other quaternion to perform the dot product with.\n"" :type other: :class:`Quaternion`\n"" :return: The dot product.\n"" :rtype: :class:`Quaternion`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_invert_doc | , |
".. function:: invert()\n""\n"" Set the quaternion to its inverse.\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_inverted_doc | , |
".. function:: inverted()\n""\n"" Return a | new, | ||
inverted quaternion.\n""\n"":return:the inverted value.\n"":rtype::class:`Quaternion`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_axis_doc | , |
"Quaternion axis value.\n\n:type: float" | |||
) |
PyDoc_STRVAR | ( | Quaternion_rotation_difference_doc | , |
".. function:: rotation_difference(other)\n""\n"" Returns a quaternion representing the rotational difference.\n""\n"" :arg other: second quaternion.\n"" :type other: :class:`Quaternion`\n"" :return: the rotational difference between the two quat rotations.\n"" :rtype: :class:`Quaternion`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_identity_doc | , |
".. function:: identity()\n""\n"" Set the quaternion to an identity quaternion.\n""\n"" :return: an instance of itself.\n"" :rtype: :class:`Quaternion`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_magnitude_doc | , |
"Size of the quaternion (readonly).\n\n:type: float" | |||
) |
PyDoc_STRVAR | ( | Quaternion_angle_doc | , |
"Angle of the quaternion.\n\n:type: float" | |||
) |
PyDoc_STRVAR | ( | Quaternion_negate_doc | , |
".. function:: negate()\n""\n"" Set the quaternion to its negative.\n""\n"" :return: an instance of itself.\n"" :rtype: :class:`Quaternion`\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_axis_vector_doc | , |
"Quaternion axis as a vector.\n\n:type: :class:`Vector`" | |||
) |
static PyObject * quat__apply_to_copy | ( | PyNoArgsFunction | quat_func, |
QuaternionObject * | self | ||
) | [static] |
Definition at line 1090 of file mathutils_Quaternion.c.
References NULL, and Quaternion_copy().
Referenced by Quaternion_conjugated(), Quaternion_inverted(), and Quaternion_normalized().
static void quat__axis_angle_sanitize | ( | float | axis[3], |
float * | angle | ||
) | [static] |
Definition at line 1105 of file mathutils_Quaternion.c.
References EXPP_FloatsAreEqual().
Referenced by Quaternion_angle_get(), Quaternion_angle_set(), Quaternion_axis_vector_get(), Quaternion_axis_vector_set(), and Quaternion_to_axis_angle().
static PyObject* quat_mul_float | ( | QuaternionObject * | quat, |
const float | scalar | ||
) | [static] |
Definition at line 782 of file mathutils_Quaternion.c.
References copy_qt_qt(), mul_qt_fl(), Py_NEW, and Quaternion_CreatePyObject().
Referenced by Quaternion_mul().
static PyObject* Quaternion_add | ( | PyObject * | q1, |
PyObject * | q2 | ||
) | [static] |
Definition at line 732 of file mathutils_Quaternion.c.
References add_qt_qtqt(), BaseMath_ReadCallback, NULL, Py_NEW, QUAT_SIZE, Quaternion_CreatePyObject(), and QuaternionObject_Check.
static PyObject* Quaternion_angle_get | ( | QuaternionObject * | self, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 954 of file mathutils_Quaternion.c.
References angle(), BaseMath_ReadCallback, normalize_qt_qt(), NULL, quat__axis_angle_sanitize(), and saacos().
static int Quaternion_angle_set | ( | QuaternionObject * | self, |
PyObject * | value, | ||
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 971 of file mathutils_Quaternion.c.
References angle(), angle_wrap_rad(), axis_angle_to_quat(), BaseMath_ReadCallback, BaseMath_WriteCallback, len(), mul_qt_fl(), normalize_qt_qt(), quat__axis_angle_sanitize(), and quat_to_axis_angle().
static int Quaternion_ass_item | ( | QuaternionObject * | self, |
int | i, | ||
PyObject * | ob | ||
) | [static] |
Definition at line 578 of file mathutils_Quaternion.c.
References BaseMath_WriteIndexCallback, i, and QUAT_SIZE.
Referenced by Quaternion_ass_subscript(), and Quaternion_axis_set().
static int Quaternion_ass_slice | ( | QuaternionObject * | self, |
int | begin, | ||
int | end, | ||
PyObject * | seq | ||
) | [static] |
Definition at line 627 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, CLAMP(), i, mathutils_array_parse(), MIN2, QUAT_SIZE, and size().
Referenced by Quaternion_ass_subscript().
static int Quaternion_ass_subscript | ( | QuaternionObject * | self, |
PyObject * | item, | ||
PyObject * | value | ||
) | [static] |
Definition at line 697 of file mathutils_Quaternion.c.
References i, QUAT_SIZE, Quaternion_ass_item(), Quaternion_ass_slice(), and step().
static PyObject* Quaternion_axis_get | ( | QuaternionObject * | self, |
void * | type | ||
) | [static] |
Definition at line 930 of file mathutils_Quaternion.c.
References GET_INT_FROM_POINTER, and Quaternion_item().
static int Quaternion_axis_set | ( | QuaternionObject * | self, |
PyObject * | value, | ||
void * | type | ||
) | [static] |
Definition at line 935 of file mathutils_Quaternion.c.
References GET_INT_FROM_POINTER, and Quaternion_ass_item().
static PyObject* Quaternion_axis_vector_get | ( | QuaternionObject * | self, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 1009 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, normalize_qt_qt(), NULL, Py_NEW, quat__axis_angle_sanitize(), quat_to_axis_angle(), and Vector_CreatePyObject().
static int Quaternion_axis_vector_set | ( | QuaternionObject * | self, |
PyObject * | value, | ||
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 1027 of file mathutils_Quaternion.c.
References angle(), axis_angle_to_quat(), BaseMath_ReadCallback, BaseMath_WriteCallback, len(), mathutils_array_parse(), mul_qt_fl(), normalize_qt_qt(), quat__axis_angle_sanitize(), and quat_to_axis_angle().
static PyObject* Quaternion_conjugate | ( | QuaternionObject * | self | ) | [static] |
Definition at line 439 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, conjugate_qt(), and NULL.
Referenced by Quaternion_conjugated().
static PyObject* Quaternion_conjugated | ( | QuaternionObject * | self | ) | [static] |
Definition at line 457 of file mathutils_Quaternion.c.
References quat__apply_to_copy(), and Quaternion_conjugate().
static PyObject * Quaternion_copy | ( | QuaternionObject * | self | ) | [static] |
Definition at line 474 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, NULL, Py_NEW, and Quaternion_CreatePyObject().
Referenced by quat__apply_to_copy().
PyObject* Quaternion_CreatePyObject | ( | float * | quat, |
int | type, | ||
PyTypeObject * | base_type | ||
) |
Definition at line 1238 of file mathutils_Quaternion.c.
References copy_qt_qt(), NULL, Py_NEW, Py_WRAP, QUAT_SIZE, and unit_qt().
Referenced by Euler_to_quaternion(), Matrix_decompose(), Matrix_to_quaternion(), pyrna_math_object_from_array(), quat_mul_float(), Quaternion_add(), Quaternion_copy(), Quaternion_CreatePyObject_cb(), Quaternion_cross(), Quaternion_mul(), Quaternion_neg(), Quaternion_new(), Quaternion_rotation_difference(), Quaternion_slerp(), Quaternion_sub(), Vector_rotation_difference(), and Vector_to_track_quat().
PyObject* Quaternion_CreatePyObject_cb | ( | PyObject * | cb_user, |
int | cb_type, | ||
int | cb_subtype | ||
) |
Definition at line 1271 of file mathutils_Quaternion.c.
References Py_NEW, and Quaternion_CreatePyObject().
Referenced by pyrna_math_object_from_array().
static PyObject* Quaternion_cross | ( | QuaternionObject * | self, |
PyObject * | value | ||
) | [static] |
Definition at line 190 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, mathutils_array_parse(), mul_qt_qtqt(), NULL, Py_NEW, QUAT_SIZE, and Quaternion_CreatePyObject().
static PyObject* Quaternion_dot | ( | QuaternionObject * | self, |
PyObject * | value | ||
) | [static] |
Definition at line 217 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, dot_qtqt(), mathutils_array_parse(), NULL, and QUAT_SIZE.
static PyObject* Quaternion_identity | ( | QuaternionObject * | self | ) | [static] |
Definition at line 404 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, NULL, and unit_qt().
static PyObject* Quaternion_invert | ( | QuaternionObject * | self | ) | [static] |
Definition at line 372 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, invert_qt(), and NULL.
Referenced by Quaternion_inverted().
static PyObject* Quaternion_inverted | ( | QuaternionObject * | self | ) | [static] |
Definition at line 390 of file mathutils_Quaternion.c.
References quat__apply_to_copy(), and Quaternion_invert().
static PyObject* Quaternion_item | ( | QuaternionObject * | self, |
int | i | ||
) | [static] |
Definition at line 559 of file mathutils_Quaternion.c.
References BaseMath_ReadIndexCallback, i, NULL, and QUAT_SIZE.
Referenced by Quaternion_axis_get(), and Quaternion_subscript().
static int Quaternion_len | ( | QuaternionObject * | UNUSEDself | ) | [static] |
Definition at line 553 of file mathutils_Quaternion.c.
References QUAT_SIZE.
static PyObject* Quaternion_magnitude_get | ( | QuaternionObject * | self, |
void * | UNUSEDclosure | ||
) | [static] |
Definition at line 943 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, dot_qtqt(), NULL, and sqrt().
static PyObject* Quaternion_mul | ( | PyObject * | q1, |
PyObject * | q2 | ||
) | [static] |
Definition at line 792 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BLI_assert, copy_v3_v3(), mul_qt_qtqt(), mul_qt_v3(), NULL, Py_NEW, quat_mul_float(), QUAT_SIZE, Quaternion_CreatePyObject(), QuaternionObject_Check, VectorObject::size, Vector_CreatePyObject(), and VectorObject_Check.
static PyObject* Quaternion_neg | ( | QuaternionObject * | self | ) | [static] |
Definition at line 858 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, negate_v4_v4(), NULL, Py_NEW, QUAT_SIZE, and Quaternion_CreatePyObject().
static PyObject* Quaternion_negate | ( | QuaternionObject * | self | ) | [static] |
Definition at line 423 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, mul_qt_fl(), and NULL.
static PyObject* Quaternion_new | ( | PyTypeObject * | type, |
PyObject * | args, | ||
PyObject * | kwds | ||
) | [static] |
Definition at line 1056 of file mathutils_Quaternion.c.
References angle(), angle_wrap_rad(), axis_angle_to_quat(), mathutils_array_parse(), NULL, Py_NEW, QUAT_SIZE, and Quaternion_CreatePyObject().
static PyObject* Quaternion_normalize | ( | QuaternionObject * | self | ) | [static] |
Definition at line 343 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, normalize_qt(), and NULL.
Referenced by Quaternion_normalized().
static PyObject* Quaternion_normalized | ( | QuaternionObject * | self | ) | [static] |
Definition at line 361 of file mathutils_Quaternion.c.
References quat__apply_to_copy(), and Quaternion_normalize().
static PyObject* Quaternion_repr | ( | QuaternionObject * | self | ) | [static] |
Definition at line 484 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, NULL, and Quaternion_to_tuple_ext().
static PyObject* Quaternion_richcmpr | ( | PyObject * | a, |
PyObject * | b, | ||
int | op | ||
) | [static] |
Definition at line 514 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, EXPP_VectorsAreEqual(), NULL, QUAT_SIZE, and QuaternionObject_Check.
static PyObject* Quaternion_rotate | ( | QuaternionObject * | self, |
PyObject * | value | ||
) | [static] |
Definition at line 314 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, length(), mat3_to_quat(), mathutils_any_to_rotmat(), mul_m3_m3m3(), mul_qt_fl(), normalize_qt_qt(), NULL, and quat_to_mat3().
static PyObject* Quaternion_rotation_difference | ( | QuaternionObject * | self, |
PyObject * | value | ||
) | [static] |
Definition at line 243 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, mathutils_array_parse(), NULL, Py_NEW, QUAT_SIZE, Quaternion_CreatePyObject(), and rotation_between_quats_to_quat().
static PyObject* Quaternion_slerp | ( | QuaternionObject * | self, |
PyObject * | args | ||
) | [static] |
Definition at line 273 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, interp_qt_qtqt(), mathutils_array_parse(), NULL, Py_NEW, QUAT_SIZE, and Quaternion_CreatePyObject().
static PyObject* Quaternion_slice | ( | QuaternionObject * | self, |
int | begin, | ||
int | end | ||
) | [static] |
Definition at line 605 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, CLAMP(), MIN2, NULL, and QUAT_SIZE.
Referenced by Quaternion_subscript().
static PyObject* Quaternion_str | ( | QuaternionObject * | self | ) | [static] |
Definition at line 499 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BLI_dynstr_appendf(), BLI_dynstr_new(), mathutils_dynstr_to_py(), and NULL.
static PyObject* Quaternion_sub | ( | PyObject * | q1, |
PyObject * | q2 | ||
) | [static] |
Definition at line 755 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, NULL, Py_NEW, QUAT_SIZE, Quaternion_CreatePyObject(), and QuaternionObject_Check.
static PyObject* Quaternion_subscript | ( | QuaternionObject * | self, |
PyObject * | item | ||
) | [static] |
Definition at line 659 of file mathutils_Quaternion.c.
References i, NULL, QUAT_SIZE, Quaternion_item(), Quaternion_slice(), and step().
static PyObject* Quaternion_to_axis_angle | ( | QuaternionObject * | self | ) | [static] |
Definition at line 155 of file mathutils_Quaternion.c.
References angle(), BaseMath_ReadCallback, normalize_qt_qt(), NULL, Py_NEW, quat__axis_angle_sanitize(), quat_to_axis_angle(), and Vector_CreatePyObject().
static PyObject* Quaternion_to_euler | ( | QuaternionObject * | self, |
PyObject * | args | ||
) | [static] |
Definition at line 85 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, Euler_CreatePyObject(), euler_order_from_string(), EULER_ORDER_XYZ, euler_Type, mat3_to_compatible_eul(), mat3_to_compatible_eulO(), normalize_qt_qt(), NULL, Py_NEW, quat_to_eul(), quat_to_eulO(), and quat_to_mat3().
static PyObject* Quaternion_to_matrix | ( | QuaternionObject * | self | ) | [static] |
Definition at line 135 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, Matrix_CreatePyObject(), NULL, Py_NEW, and quat_to_mat3().
static PyObject* Quaternion_to_tuple_ext | ( | QuaternionObject * | self, |
int | ndigits | ||
) | [static] |
Definition at line 49 of file mathutils_Quaternion.c.
References double_round(), i, and QUAT_SIZE.
Referenced by Quaternion_repr().
PyMappingMethods Quaternion_AsMapping [static] |
{ (lenfunc)Quaternion_len, (binaryfunc)Quaternion_subscript, (objobjargproc)Quaternion_ass_subscript }
Definition at line 884 of file mathutils_Quaternion.c.
PyGetSetDef Quaternion_getseters[] [static] |
{ {(char *)"w", (getter)Quaternion_axis_get, (setter)Quaternion_axis_set, Quaternion_axis_doc, (void *)0}, {(char *)"x", (getter)Quaternion_axis_get, (setter)Quaternion_axis_set, Quaternion_axis_doc, (void *)1}, {(char *)"y", (getter)Quaternion_axis_get, (setter)Quaternion_axis_set, Quaternion_axis_doc, (void *)2}, {(char *)"z", (getter)Quaternion_axis_get, (setter)Quaternion_axis_set, Quaternion_axis_doc, (void *)3}, {(char *)"magnitude", (getter)Quaternion_magnitude_get, (setter)NULL, Quaternion_magnitude_doc, NULL}, {(char *)"angle", (getter)Quaternion_angle_get, (setter)Quaternion_angle_set, Quaternion_angle_doc, NULL}, {(char *)"axis",(getter)Quaternion_axis_vector_get, (setter)Quaternion_axis_vector_set, Quaternion_axis_vector_doc, 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 1167 of file mathutils_Quaternion.c.
struct PyMethodDef Quaternion_methods[] [static] |
Definition at line 1132 of file mathutils_Quaternion.c.
PyNumberMethods Quaternion_NumMethods [static] |
Definition at line 890 of file mathutils_Quaternion.c.
PySequenceMethods Quaternion_SeqMethods [static] |
{ (lenfunc) Quaternion_len, (binaryfunc) NULL, (ssizeargfunc) NULL, (ssizeargfunc) Quaternion_item, (ssizessizeargfunc) NULL, (ssizeobjargproc) Quaternion_ass_item, (ssizessizeobjargproc) NULL, (objobjproc) NULL, (binaryfunc) NULL, (ssizeargfunc) NULL, }
Definition at line 871 of file mathutils_Quaternion.c.
PyTypeObject quaternion_Type |
Definition at line 1184 of file mathutils_Quaternion.c.
Referenced by PyInit_mathutils().