|
Blender
V2.59
|
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 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_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:: 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_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) |
| static PyObject * | Quaternion_getAxis (QuaternionObject *self, void *type) |
| static int | Quaternion_setAxis (QuaternionObject *self, PyObject *value, void *type) |
| static PyObject * | Quaternion_getMagnitude (QuaternionObject *self, void *UNUSED(closure)) |
| static PyObject * | Quaternion_getAngle (QuaternionObject *self, void *UNUSED(closure)) |
| static int | Quaternion_setAngle (QuaternionObject *self, PyObject *value, void *UNUSED(closure)) |
| static PyObject * | Quaternion_getAxisVec (QuaternionObject *self, void *UNUSED(closure)) |
| static int | Quaternion_setAxisVec (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 * | newQuaternionObject (float *quat, int type, PyTypeObject *base_type) |
| PyObject * | newQuaternionObject_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 |
| #define QUAT_SIZE 4 |
Definition at line 41 of file mathutils_Quaternion.c.
Referenced by newQuaternionObject(), Quaternion_add(), Quaternion_ass_item(), Quaternion_ass_slice(), Quaternion_ass_subscript(), 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().
| PyObject* newQuaternionObject | ( | float * | quat, |
| int | type, | ||
| PyTypeObject * | base_type | ||
| ) |
Definition at line 1140 of file mathutils_Quaternion.c.
References NULL, Py_NEW, Py_WRAP, QUAT_SIZE, QUATCOPY, and unit_qt().
Referenced by Euler_to_quaternion(), Matrix_decompose(), Matrix_to_quaternion(), newQuaternionObject_cb(), pyrna_math_object_from_array(), quat_mul_float(), Quaternion_add(), Quaternion_copy(), Quaternion_cross(), Quaternion_mul(), Quaternion_neg(), Quaternion_new(), Quaternion_rotation_difference(), Quaternion_slerp(), Quaternion_sub(), Vector_rotation_difference(), and Vector_to_track_quat().
| PyObject* newQuaternionObject_cb | ( | PyObject * | cb_user, |
| int | cb_type, | ||
| int | cb_subtype | ||
| ) |
Definition at line 1173 of file mathutils_Quaternion.c.
References newQuaternionObject(), NULL, and Py_NEW.
Referenced by pyrna_math_object_from_array().
| 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_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_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_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_rotation_difference_doc | , |
| ".. function:: 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_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_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_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_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_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_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_conjugate_doc | , |
| ".. function:: conjugate()\n""\n"" Set the quaternion to its conjugate (negate x, y, z).\n" | |||
| ) |
| 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_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_doc | , |
| "This object gives access to Quaternions in Blender." | |||
| ) |
| static PyObject * quat__apply_to_copy | ( | PyNoArgsFunction | quat_func, |
| QuaternionObject * | self | ||
| ) | [static] |
Definition at line 1020 of file mathutils_Quaternion.c.
References NULL, and Quaternion_copy().
Referenced by Quaternion_conjugated(), Quaternion_inverted(), and Quaternion_normalized().
| static PyObject* quat_mul_float | ( | QuaternionObject * | quat, |
| const float | scalar | ||
| ) | [static] |
Definition at line 720 of file mathutils_Quaternion.c.
References copy_qt_qt(), mul_qt_fl(), newQuaternionObject(), and Py_NEW.
Referenced by Quaternion_mul().
| static PyObject* Quaternion_add | ( | PyObject * | q1, |
| PyObject * | q2 | ||
| ) | [static] |
Definition at line 672 of file mathutils_Quaternion.c.
References add_qt_qtqt(), BaseMath_ReadCallback, newQuaternionObject(), NULL, Py_NEW, QUAT_SIZE, and QuaternionObject_Check.
| static int Quaternion_ass_item | ( | QuaternionObject * | self, |
| int | i, | ||
| PyObject * | ob | ||
| ) | [static] |
Definition at line 519 of file mathutils_Quaternion.c.
References BaseMath_WriteIndexCallback, i, and QUAT_SIZE.
Referenced by Quaternion_ass_subscript(), and Quaternion_setAxis().
| static int Quaternion_ass_slice | ( | QuaternionObject * | self, |
| int | begin, | ||
| int | end, | ||
| PyObject * | seq | ||
| ) | [static] |
Definition at line 568 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 637 of file mathutils_Quaternion.c.
References i, QUAT_SIZE, Quaternion_ass_item(), and Quaternion_ass_slice().
| static PyObject* Quaternion_conjugate | ( | QuaternionObject * | self | ) | [static] |
Definition at line 395 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 413 of file mathutils_Quaternion.c.
References quat__apply_to_copy(), and Quaternion_conjugate().
| static PyObject * Quaternion_copy | ( | QuaternionObject * | self | ) | [static] |
Definition at line 430 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, newQuaternionObject(), NULL, and Py_NEW.
Referenced by quat__apply_to_copy().
| static PyObject* Quaternion_cross | ( | QuaternionObject * | self, |
| PyObject * | value | ||
| ) | [static] |
Definition at line 157 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, mathutils_array_parse(), mul_qt_qtqt(), newQuaternionObject(), NULL, Py_NEW, and QUAT_SIZE.
| static PyObject* Quaternion_dot | ( | QuaternionObject * | self, |
| PyObject * | value | ||
| ) | [static] |
Definition at line 182 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, dot_qtqt(), mathutils_array_parse(), NULL, and QUAT_SIZE.
| static PyObject* Quaternion_getAngle | ( | QuaternionObject * | self, |
| void * | UNUSEDclosure | ||
| ) | [static] |
Definition at line 883 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, normalize_qt_qt(), NULL, and saacos().
| static PyObject* Quaternion_getAxis | ( | QuaternionObject * | self, |
| void * | type | ||
| ) | [static] |
Definition at line 865 of file mathutils_Quaternion.c.
References GET_INT_FROM_POINTER, and Quaternion_item().
| static PyObject* Quaternion_getAxisVec | ( | QuaternionObject * | self, |
| void * | UNUSEDclosure | ||
| ) | [static] |
Definition at line 935 of file mathutils_Quaternion.c.
References angle(), BaseMath_ReadCallback, EXPP_FloatsAreEqual(), newVectorObject(), normalize_qt_qt(), NULL, Py_NEW, and quat_to_axis_angle().
| static PyObject* Quaternion_getMagnitude | ( | QuaternionObject * | self, |
| void * | UNUSEDclosure | ||
| ) | [static] |
Definition at line 875 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, dot_qtqt(), NULL, and sqrt().
| static PyObject* Quaternion_identity | ( | QuaternionObject * | self | ) | [static] |
Definition at line 360 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, NULL, and unit_qt().
| static PyObject* Quaternion_invert | ( | QuaternionObject * | self | ) | [static] |
Definition at line 328 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 346 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 500 of file mathutils_Quaternion.c.
References BaseMath_ReadIndexCallback, i, NULL, and QUAT_SIZE.
Referenced by Quaternion_getAxis(), and Quaternion_subscript().
| static int Quaternion_len | ( | QuaternionObject * | UNUSEDself | ) | [static] |
Definition at line 494 of file mathutils_Quaternion.c.
References QUAT_SIZE.
| static PyObject* Quaternion_mul | ( | PyObject * | q1, |
| PyObject * | q2 | ||
| ) | [static] |
Definition at line 730 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BLI_assert, copy_v3_v3(), mul_qt_qtqt(), mul_qt_v3(), newQuaternionObject(), newVectorObject(), NULL, Py_NEW, quat_mul_float(), QUAT_SIZE, QuaternionObject_Check, VectorObject::size, and VectorObject_Check.
| static PyObject* Quaternion_neg | ( | QuaternionObject * | self | ) | [static] |
Definition at line 796 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, negate_v4_v4(), newQuaternionObject(), NULL, Py_NEW, and QUAT_SIZE.
| static PyObject* Quaternion_negate | ( | QuaternionObject * | self | ) | [static] |
Definition at line 379 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 986 of file mathutils_Quaternion.c.
References angle(), angle_wrap_rad(), axis_angle_to_quat(), mathutils_array_parse(), newQuaternionObject(), NULL, Py_NEW, and QUAT_SIZE.
| static PyObject* Quaternion_normalize | ( | QuaternionObject * | self | ) | [static] |
Definition at line 299 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 317 of file mathutils_Quaternion.c.
References quat__apply_to_copy(), and Quaternion_normalize().
| static PyObject* Quaternion_repr | ( | QuaternionObject * | self | ) | [static] |
Definition at line 440 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 455 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 270 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 205 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, mathutils_array_parse(), newQuaternionObject(), NULL, Py_NEW, QUAT_SIZE, and rotation_between_quats_to_quat().
| static int Quaternion_setAngle | ( | QuaternionObject * | self, |
| PyObject * | value, | ||
| void * | UNUSEDclosure | ||
| ) | [static] |
Definition at line 894 of file mathutils_Quaternion.c.
References angle(), angle_wrap_rad(), axis_angle_to_quat(), BaseMath_ReadCallback, BaseMath_WriteCallback, EXPP_FloatsAreEqual(), mul_qt_fl(), normalize_qt_qt(), and quat_to_axis_angle().
| static int Quaternion_setAxis | ( | QuaternionObject * | self, |
| PyObject * | value, | ||
| void * | type | ||
| ) | [static] |
Definition at line 870 of file mathutils_Quaternion.c.
References GET_INT_FROM_POINTER, and Quaternion_ass_item().
| static int Quaternion_setAxisVec | ( | QuaternionObject * | self, |
| PyObject * | value, | ||
| void * | UNUSEDclosure | ||
| ) | [static] |
Definition at line 959 of file mathutils_Quaternion.c.
References angle(), axis_angle_to_quat(), BaseMath_ReadCallback, BaseMath_WriteCallback, mathutils_array_parse(), mul_qt_fl(), normalize_qt_qt(), and quat_to_axis_angle().
| static PyObject* Quaternion_slerp | ( | QuaternionObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 232 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, interp_qt_qtqt(), mathutils_array_parse(), newQuaternionObject(), NULL, Py_NEW, and QUAT_SIZE.
| static PyObject* Quaternion_slice | ( | QuaternionObject * | self, |
| int | begin, | ||
| int | end | ||
| ) | [static] |
Definition at line 546 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, CLAMP(), MIN2, NULL, and QUAT_SIZE.
Referenced by Quaternion_subscript().
| static PyObject* Quaternion_sub | ( | PyObject * | q1, |
| PyObject * | q2 | ||
| ) | [static] |
Definition at line 694 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, newQuaternionObject(), NULL, Py_NEW, QUAT_SIZE, and QuaternionObject_Check.
| static PyObject* Quaternion_subscript | ( | QuaternionObject * | self, |
| PyObject * | item | ||
| ) | [static] |
Definition at line 600 of file mathutils_Quaternion.c.
References i, NULL, QUAT_SIZE, Quaternion_item(), and Quaternion_slice().
| static PyObject* Quaternion_to_euler | ( | QuaternionObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Definition at line 85 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, euler_order_from_string(), EULER_ORDER_XYZ, euler_Type, mat3_to_compatible_eul(), mat3_to_compatible_eulO(), newEulerObject(), 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, newMatrixObject(), 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 822 of file mathutils_Quaternion.c.
PyGetSetDef Quaternion_getseters[] [static] |
{
{(char *)"w", (getter)Quaternion_getAxis, (setter)Quaternion_setAxis, (char *)"Quaternion W value.\n\n:type: float", (void *)0},
{(char *)"x", (getter)Quaternion_getAxis, (setter)Quaternion_setAxis, (char *)"Quaternion X axis.\n\n:type: float", (void *)1},
{(char *)"y", (getter)Quaternion_getAxis, (setter)Quaternion_setAxis, (char *)"Quaternion Y axis.\n\n:type: float", (void *)2},
{(char *)"z", (getter)Quaternion_getAxis, (setter)Quaternion_setAxis, (char *)"Quaternion Z axis.\n\n:type: float", (void *)3},
{(char *)"magnitude", (getter)Quaternion_getMagnitude, (setter)NULL, (char *)"Size of the quaternion (readonly).\n\n:type: float", NULL},
{(char *)"angle", (getter)Quaternion_getAngle, (setter)Quaternion_setAngle, (char *)"angle of the quaternion.\n\n:type: float", NULL},
{(char *)"axis",(getter)Quaternion_getAxisVec, (setter)Quaternion_setAxisVec, (char *)"quaternion axis as a vector.\n\n:type: :class:`Vector`", NULL},
{(char *)"is_wrapped", (getter)BaseMathObject_getWrapped, (setter)NULL, (char *)BaseMathObject_Wrapped_doc, NULL},
{(char *)"owner", (getter)BaseMathObject_getOwner, (setter)NULL, (char *)BaseMathObject_Owner_doc, NULL},
{NULL, NULL, NULL, NULL, NULL}
}
Definition at line 1069 of file mathutils_Quaternion.c.
struct PyMethodDef Quaternion_methods[] [static] |
{
{"identity", (PyCFunction) Quaternion_identity, METH_NOARGS, Quaternion_identity_doc},
{"negate", (PyCFunction) Quaternion_negate, METH_NOARGS, Quaternion_negate_doc},
{"conjugate", (PyCFunction) Quaternion_conjugate, METH_NOARGS, Quaternion_conjugate_doc},
{"conjugated", (PyCFunction) Quaternion_conjugated, METH_NOARGS, Quaternion_conjugated_doc},
{"invert", (PyCFunction) Quaternion_invert, METH_NOARGS, Quaternion_invert_doc},
{"inverted", (PyCFunction) Quaternion_inverted, METH_NOARGS, Quaternion_inverted_doc},
{"normalize", (PyCFunction) Quaternion_normalize, METH_NOARGS, Quaternion_normalize_doc},
{"normalized", (PyCFunction) Quaternion_normalized, METH_NOARGS, Quaternion_normalized_doc},
{"to_euler", (PyCFunction) Quaternion_to_euler, METH_VARARGS, Quaternion_to_euler_doc},
{"to_matrix", (PyCFunction) Quaternion_to_matrix, METH_NOARGS, Quaternion_to_matrix_doc},
{"cross", (PyCFunction) Quaternion_cross, METH_O, Quaternion_cross_doc},
{"dot", (PyCFunction) Quaternion_dot, METH_O, Quaternion_dot_doc},
{"rotation_difference", (PyCFunction) Quaternion_rotation_difference, METH_O, Quaternion_rotation_difference_doc},
{"slerp", (PyCFunction) Quaternion_slerp, METH_VARARGS, Quaternion_slerp_doc},
{"rotate", (PyCFunction) Quaternion_rotate, METH_O, Quaternion_rotate_doc},
{"__copy__", (PyCFunction) Quaternion_copy, METH_NOARGS, Quaternion_copy_doc},
{"copy", (PyCFunction) Quaternion_copy, METH_NOARGS, Quaternion_copy_doc},
{NULL, NULL, 0, NULL}
}
Definition at line 1035 of file mathutils_Quaternion.c.
PyNumberMethods Quaternion_NumMethods [static] |
Definition at line 828 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 809 of file mathutils_Quaternion.c.
| PyTypeObject quaternion_Type |
Definition at line 1086 of file mathutils_Quaternion.c.
Referenced by PyInit_mathutils().