Blender
V3.3
|
#include <Python.h>
#include "mathutils.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "../generic/py_capi_utils.h"
#include "../generic/python_utildefines.h"
#include "BLI_dynstr.h"
Go to the source code of this file.
Macros | |
#define | QUAT_SIZE 4 |
Functions | |
Utilities | |
static PyObject * | quat__apply_to_copy (PyObject *(*quat_func)(QuaternionObject *), QuaternionObject *self) |
static void | quat__axis_angle_sanitize (float axis[3], float *angle) |
static PyObject * | Quaternion_to_tuple_ext (QuaternionObject *self, int ndigits) |
Quaternion Methods: Copy/Deep-Copy | |
static PyObject * | Quaternion_copy (QuaternionObject *self) |
static PyObject * | Quaternion_deepcopy (QuaternionObject *self, PyObject *args) |
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") | |
Quaternion Type: <tt>__new__</tt> / <tt>mathutils.Quaternion()</tt> | |
static PyObject * | Quaternion_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
Quaternion Methods: To Euler | |
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) |
Quaternion Methods: To Matrix | |
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) |
Quaternion Methods: To Axis/Angle | |
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) |
Quaternion Methods: To Swing/Twist | |
PyDoc_STRVAR (Quaternion_to_swing_twist_doc, ".. method:: to_swing_twist(axis)\n" "\n" " Split the rotation into a swing quaternion with the specified\n" " axis fixed at zero, and the remaining twist rotation angle.\n" "\n" " :arg axis: twist axis as a string in ['X', 'Y', 'Z']\n" " :return: swing, twist angle.\n" " :rtype: (:class:`Quaternion`, float) pair\n") | |
static PyObject * | Quaternion_to_swing_twist (QuaternionObject *self, PyObject *axis_arg) |
Quaternion Methods: To Exponential Map | |
PyDoc_STRVAR (Quaternion_to_exponential_map_doc, ".. method:: to_exponential_map()\n" "\n" " Return the exponential map representation of the quaternion.\n" "\n" " This representation consist of the rotation axis multiplied by the rotation angle.\n" " Such a representation is useful for interpolation between multiple orientations.\n" "\n" " :return: exponential map.\n" " :rtype: :class:`Vector` of size 3\n" "\n" " To convert back to a quaternion, pass it to the :class:`Quaternion` constructor.\n") | |
static PyObject * | Quaternion_to_exponential_map (QuaternionObject *self) |
Quaternion Methods: Cross Product | |
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) |
Quaternion Methods: Dot Product | |
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: float\n") | |
static PyObject * | Quaternion_dot (QuaternionObject *self, PyObject *value) |
Quaternion Methods: Rotation Difference | |
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) |
Quaternion Methods: Spherical Interpolation (slerp) | |
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) |
Quaternion Methods: Rotate | |
PyDoc_STRVAR (Quaternion_rotate_doc, ".. method:: rotate(other)\n" "\n" " Rotates the quaternion 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_make_compatible_doc, ".. method:: make_compatible(other)\n" "\n" " Make this quaternion compatible with another,\n" " so interpolating between them works as intended.\n") | |
static PyObject * | Quaternion_make_compatible (QuaternionObject *self, PyObject *value) |
Quaternion Methods: Normalize | |
Normalize the quaternion. This may change the angle as well as the rotation axis, as all of (w, x, y, z) are scaled. | |
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) |
Quaternion Methods: Invert | |
Normalize the quaternion. This may change the angle as well as the rotation axis, as all of (w, x, y, z) are scaled. | |
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) |
Quaternion Methods: Set Identity | |
PyDoc_STRVAR (Quaternion_identity_doc, ".. function:: identity()\n" "\n" " Set the quaternion to an identity quaternion.\n" "\n" " :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_identity (QuaternionObject *self) |
Quaternion Methods: Negate | |
PyDoc_STRVAR (Quaternion_negate_doc, ".. function:: negate()\n" "\n" " Set the quaternion to its negative.\n" "\n" " :rtype: :class:`Quaternion`\n") | |
static PyObject * | Quaternion_negate (QuaternionObject *self) |
Quaternion Methods: Conjugate | |
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) |
Quaternion Type: <tt>__repr__</tt> & <tt>__str__</tt> | |
static PyObject * | Quaternion_repr (QuaternionObject *self) |
static PyObject * | Quaternion_str (QuaternionObject *self) |
Quaternion Type: Rich Compare | |
static PyObject * | Quaternion_richcmpr (PyObject *a, PyObject *b, int op) |
Quaternion Type: Hash (<tt>__hash__</tt>) | |
static Py_hash_t | Quaternion_hash (QuaternionObject *self) |
Quaternion Type: Sequence & Mapping Protocols Implementation | |
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) |
Quaternion Type: Numeric Protocol Implementation | |
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_imul (PyObject *q1, PyObject *q2) |
static PyObject * | Quaternion_matmul (PyObject *q1, PyObject *q2) |
static PyObject * | Quaternion_imatmul (PyObject *q1, PyObject *q2) |
static PyObject * | Quaternion_neg (QuaternionObject *self) |
Quaternion Type: Get/Set Item Implementation | |
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 (read-only).\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)) |
Quaternion Type: C/API Constructors | |
PyObject * | Quaternion_CreatePyObject (const float quat[4], PyTypeObject *base_type) |
PyObject * | Quaternion_CreatePyObject_wrap (float quat[4], PyTypeObject *base_type) |
PyObject * | Quaternion_CreatePyObject_cb (PyObject *cb_user, uchar cb_type, uchar cb_subtype) |
Variables | |
Quaternion Type: Protocol Declarations | |
static PySequenceMethods | Quaternion_SeqMethods |
static PyMappingMethods | Quaternion_AsMapping |
static PyNumberMethods | Quaternion_NumMethods |
Quaternion Type: Get/Set Item Definitions | |
static PyGetSetDef | Quaternion_getseters [] |
Quaternion Type: Method Definitions | |
static struct PyMethodDef | Quaternion_methods [] |
Quaternion Type: Python Object Definition | |
PyTypeObject | quaternion_Type |
PyDoc_STRVAR (quaternion_doc, ".. class:: Quaternion([seq, [angle]])\n" "\n" " This object gives access to Quaternions in Blender.\n" "\n" " :param seq: size 3 or 4\n" " :type seq: :class:`Vector`\n" " :param angle: rotation angle, in radians\n" " :type angle: float\n" "\n" " The constructor takes arguments in various forms:\n" "\n" " (), *no args*\n" " Create an identity quaternion\n" " (*wxyz*)\n" " Create a quaternion from a ``(w, x, y, z)`` vector.\n" " (*exponential_map*)\n" " Create a quaternion from a 3d exponential map vector.\n" "\n" " .. seealso:: :meth:`to_exponential_map`\n" " (*axis, angle*)\n" " Create a quaternion representing a rotation of *angle* radians over *axis*.\n" "\n" " .. seealso:: :meth:`to_axis_angle`\n") | |
#define QUAT_SIZE 4 |
Definition at line 21 of file mathutils_Quaternion.c.
PyDoc_STRVAR | ( | Quaternion_angle_doc | , |
"Angle of the quaternion.\n\n:type: float" | |||
) |
PyDoc_STRVAR | ( | Quaternion_axis_doc | , |
"Quaternion axis value.\n\n:type: float" | |||
) |
PyDoc_STRVAR | ( | Quaternion_axis_vector_doc | , |
"Quaternion axis as a vector.\n\n:type: :class:`Vector`" | |||
) |
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_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_doc | , |
".. class:: Quaternion([seq, [angle]])\n" "\n" " This object gives access to Quaternions in Blender.\n" "\n" " :param seq: size 3 or 4\n" " :type seq: :class:`Vector`\n" " :param angle: rotation | angle, | ||
in radians\n" " :type angle:float\n" "\n" " The constructor takes arguments in various forms:\n" "\n" " | (), | ||
*no args *\n" " Create an identity quaternion\n" " **wxyz\n" " Create a quaternion from a ``(w, x, y, z)`` vector.\n" " **exponential_map\n" " Create a quaternion from a 3d exponential map vector.\n" "\n" " .. seealso:::meth:`to_exponential_map`\n" " *, *angle\n" " Create a quaternion representing a rotation of *angle *radians over *axis *.\n" "\n" " .. seealso:::meth:`to_axis_angle`\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: float\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_identity_doc | , |
".. function:: identity()\n" "\n" " Set the quaternion to an identity quaternion.\n" "\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_magnitude_doc | , |
"Size of the quaternion (read-only).\n\n:type: float" | |||
) |
PyDoc_STRVAR | ( | Quaternion_make_compatible_doc | , |
".. method:: make_compatible(other)\n" "\n" " Make this quaternion compatible with | another, | ||
\n" " so interpolating between them works as intended.\n" | |||
) |
PyDoc_STRVAR | ( | Quaternion_negate_doc | , |
".. function:: negate()\n" "\n" " Set the quaternion to its negative.\n" "\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_rotate_doc | , |
".. method:: rotate(other)\n" "\n" " Rotates the quaternion 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_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_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_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_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_exponential_map_doc | , |
".. method:: to_exponential_map()\n" "\n" " Return the exponential map representation of the quaternion.\n" "\n" " This representation consist of the rotation axis multiplied by the rotation angle.\n" " Such a representation is useful for interpolation between multiple orientations.\n" "\n" " :return: exponential map.\n" " :rtype: :class:`Vector` of size 3\n" "\n" " To convert back to a | quaternion, | ||
pass it to the :class:`Quaternion` constructor.\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_to_swing_twist_doc | , |
".. method:: to_swing_twist(axis)\n" "\n" " Split the rotation into a swing quaternion with the specified\n" " axis fixed at | zero, | ||
and the remaining twist rotation angle.\n" "\n" " :arg axis:twist axis as a string in \n" " :return:swing | [ 'X', 'Y', 'Z'], | ||
twist angle.\n" " :rtype:(:class:`Quaternion`, float) pair\n" | |||
) |
|
static |
Definition at line 33 of file mathutils_Quaternion.c.
References NULL, Quaternion_copy(), and ret.
Referenced by Quaternion_conjugated(), Quaternion_inverted(), and Quaternion_normalized().
Axis vector suffers from precision errors, use this function to ensure.
Definition at line 48 of file mathutils_Quaternion.c.
References angle(), EXPP_FloatsAreEqual(), is_zero_v3(), and CCL_NAMESPACE_BEGIN::isfinite().
Referenced by Quaternion_angle_get(), Quaternion_angle_set(), Quaternion_axis_vector_get(), Quaternion_axis_vector_set(), and Quaternion_to_axis_angle().
|
static |
Definition at line 1147 of file mathutils_Quaternion.c.
References copy_qt_qt(), mul_qt_fl(), and Quaternion_CreatePyObject().
Referenced by Quaternion_mul().
|
static |
Addition: object + object
.
Definition at line 1093 of file mathutils_Quaternion.c.
References add_qt_qtqt(), BaseMath_ReadCallback, NULL, q1, QUAT_SIZE, Quaternion_CreatePyObject(), and QuaternionObject_Check.
|
static |
Definition at line 1436 of file mathutils_Quaternion.c.
References angle(), BaseMath_ReadCallback, normalize_qt_qt(), NULL, quat__axis_angle_sanitize(), saacos(), and self.
|
static |
Definition at line 1454 of file mathutils_Quaternion.c.
References angle(), angle_wrap_rad(), axis_angle_to_quat(), BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, len, mul_qt_fl(), normalize_qt_qt(), quat__axis_angle_sanitize(), quat_to_axis_angle(), and self.
|
static |
Sequence accessor (set): object[i] = x
.
Definition at line 917 of file mathutils_Quaternion.c.
References BaseMath_Prepare_ForWrite, BaseMath_WriteIndexCallback, float(), and QUAT_SIZE.
Referenced by Quaternion_ass_subscript(), and Quaternion_axis_set().
|
static |
Sequence slice accessor (set): object[i:j] = x
.
Definition at line 979 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, CLAMP, mathutils_array_parse(), MIN2, QUAT_SIZE, size(), and void.
Referenced by Quaternion_ass_subscript().
|
static |
Sequence generic subscript (set): object[...] = x
.
Definition at line 1054 of file mathutils_Quaternion.c.
References QUAT_SIZE, Quaternion_ass_item(), and Quaternion_ass_slice().
|
static |
Definition at line 1415 of file mathutils_Quaternion.c.
References POINTER_AS_INT, Quaternion_item(), and type.
|
static |
Definition at line 1420 of file mathutils_Quaternion.c.
References POINTER_AS_INT, Quaternion_ass_item(), and type.
|
static |
Definition at line 1491 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, normalize_qt_qt(), NULL, quat__axis_angle_sanitize(), quat_to_axis_angle(), self, and Vector_CreatePyObject().
|
static |
Definition at line 1510 of file mathutils_Quaternion.c.
References angle(), axis_angle_to_quat(), BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, len, mathutils_array_parse(), mul_qt_fl(), normalize_qt_qt(), quat__axis_angle_sanitize(), quat_to_axis_angle(), and self.
|
static |
Definition at line 721 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, conjugate_qt(), NULL, self, and void.
Referenced by Quaternion_conjugated().
|
static |
Definition at line 739 of file mathutils_Quaternion.c.
References quat__apply_to_copy(), and Quaternion_conjugate().
|
static |
Definition at line 760 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, NULL, Quaternion_CreatePyObject(), and self.
Referenced by quat__apply_to_copy(), and Quaternion_deepcopy().
PyObject* Quaternion_CreatePyObject | ( | const float | quat[4], |
PyTypeObject * | base_type | ||
) |
Definition at line 1748 of file mathutils_Quaternion.c.
References BASE_MATH_FLAG_DEFAULT, BASE_MATH_NEW, copy_qt_qt(), NULL, QUAT_SIZE, quaternion_Type, self, unit_qt(), and UNLIKELY.
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_matmul(), Quaternion_mul(), Quaternion_neg(), Quaternion_new(), Quaternion_rotation_difference(), Quaternion_slerp(), Quaternion_sub(), Quaternion_to_swing_twist(), Vector_rotation_difference(), and Vector_to_track_quat().
Definition at line 1801 of file mathutils_Quaternion.c.
References NULL, and Quaternion_CreatePyObject().
Referenced by pyrna_math_object_from_array().
PyObject* Quaternion_CreatePyObject_wrap | ( | float | quat[4], |
PyTypeObject * | base_type | ||
) |
Definition at line 1784 of file mathutils_Quaternion.c.
References BASE_MATH_FLAG_DEFAULT, BASE_MATH_FLAG_IS_WRAP, BASE_MATH_NEW, NULL, and quaternion_Type.
|
static |
Definition at line 380 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, mathutils_array_parse(), mul_qt_qtqt(), NULL, QUAT_SIZE, Quaternion_CreatePyObject(), and self.
|
static |
Definition at line 768 of file mathutils_Quaternion.c.
References NULL, PyC_CheckArgs_DeepCopy(), and Quaternion_copy().
|
static |
Definition at line 413 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, dot_qtqt(), mathutils_array_parse(), NULL, QUAT_SIZE, and self.
|
static |
Definition at line 870 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMathObject_Prepare_ForHash, mathutils_array_hash(), QUAT_SIZE, and self.
|
static |
Definition at line 675 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, NULL, self, unit_qt(), and void.
|
static |
Multiplication in-place (quaternion multiply): object @= object
.
Definition at line 1295 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, copy_qt_qt(), mul_qt_qtqt(), NULL, q1, QUAT_SIZE, QuaternionObject_Check, and void.
|
static |
Multiplication in-place (element-wise or scalar): object *= object
.
Definition at line 1200 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, mul_qt_fl(), mul_vn_vn(), NULL, q1, QUAT_SIZE, QuaternionObject_Check, and void.
|
static |
Definition at line 640 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, invert_qt(), NULL, self, and void.
Referenced by Quaternion_inverted().
|
static |
Definition at line 658 of file mathutils_Quaternion.c.
References quat__apply_to_copy(), and Quaternion_invert().
|
static |
Sequence accessor (get): x = object[i]
.
Definition at line 896 of file mathutils_Quaternion.c.
References BaseMath_ReadIndexCallback, NULL, QUAT_SIZE, and self.
Referenced by Quaternion_axis_get(), and Quaternion_subscript().
|
static |
Sequence length: len(object)
.
Definition at line 890 of file mathutils_Quaternion.c.
References QUAT_SIZE.
|
static |
Definition at line 1426 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, dot_qtqt(), NULL, self, and sqrtf.
|
static |
Definition at line 564 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, mathutils_array_parse(), mul_qt_fl(), normalize_qt_qt(), NULL, QUAT_SIZE, quat_to_compatible_quat(), self, and void.
|
static |
Multiplication (quaternion multiply): object @ object
.
Definition at line 1240 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, copy_v3_v3(), mul_qt_qtqt(), mul_qt_v3(), NULL, q1, QUAT_SIZE, Quaternion_CreatePyObject(), QuaternionObject_Check, VectorObject::vec_num, Vector_CreatePyObject(), and VectorObject_Check.
|
static |
Multiplication (element-wise or scalar): object * object
.
Definition at line 1156 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, mul_vn_vnvn(), NULL, q1, quat_mul_float(), QUAT_SIZE, Quaternion_CreatePyObject(), and QuaternionObject_Check.
|
static |
Negative (returns the negative of this object): -object
.
Definition at line 1332 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, negate_v4_v4(), NULL, QUAT_SIZE, Quaternion_CreatePyObject(), and self.
|
static |
Definition at line 699 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, mul_qt_fl(), NULL, self, and void.
|
static |
Definition at line 99 of file mathutils_Quaternion.c.
References angle(), angle_wrap_rad(), axis_angle_to_quat(), BLI_assert, expmap_to_quat(), mathutils_array_parse(), NULL, QUAT_SIZE, Quaternion_CreatePyObject(), size(), type, and unit_qt().
|
static |
Definition at line 604 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, normalize_qt(), NULL, self, and void.
Referenced by Quaternion_normalized().
|
static |
Definition at line 622 of file mathutils_Quaternion.c.
References quat__apply_to_copy(), and Quaternion_normalize().
|
static |
Definition at line 782 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, NULL, Quaternion_to_tuple_ext(), and ret.
|
static |
Definition at line 826 of file mathutils_Quaternion.c.
References Freestyle::a, ATTR_FALLTHROUGH, usdtokens::b(), BaseMath_ReadCallback, EXPP_VectorsAreEqual(), NULL, QUAT_SIZE, and QuaternionObject_Check.
|
static |
Definition at line 530 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, is_negative_m3(), blender::math::length(), mat3_normalized_to_quat(), mathutils_any_to_rotmat(), mul_m3_m3m3(), mul_qt_fl(), negate_m3(), normalize_m3(), normalize_qt_qt(), NULL, quat_to_mat3(), self, and void.
|
static |
Definition at line 445 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, mathutils_array_parse(), NULL, QUAT_SIZE, Quaternion_CreatePyObject(), rotation_between_quats_to_quat(), and self.
|
static |
Definition at line 483 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, interp_qt_qtqt(), mathutils_array_parse(), NULL, QUAT_SIZE, Quaternion_CreatePyObject(), and self.
|
static |
Sequence slice accessor (get): x = object[i:j]
.
Definition at line 954 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, CLAMP, count, MIN2, NULL, QUAT_SIZE, and self.
Referenced by Quaternion_subscript().
|
static |
Definition at line 799 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, BLI_dynstr_appendf(), BLI_dynstr_new(), mathutils_dynstr_to_py(), NULL, and self.
|
static |
Subtraction: object - object
.
Definition at line 1118 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, NULL, q1, QUAT_SIZE, Quaternion_CreatePyObject(), QuaternionObject_Check, and x.
|
static |
Sequence generic subscript (get): x = object[...]
.
Definition at line 1017 of file mathutils_Quaternion.c.
References NULL, QUAT_SIZE, Quaternion_item(), and Quaternion_slice().
|
static |
Definition at line 261 of file mathutils_Quaternion.c.
References angle(), BaseMath_ReadCallback, normalize_qt_qt(), NULL, PyTuple_SET_ITEMS, quat__axis_angle_sanitize(), quat_to_axis_angle(), ret, self, and Vector_CreatePyObject().
|
static |
Definition at line 173 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, Euler_CreatePyObject(), euler_order_from_string(), EULER_ORDER_XYZ, euler_Type, normalize_qt_qt(), NULL, order, quat_to_compatible_eul(), quat_to_compatible_eulO(), quat_to_eul(), quat_to_eulO(), and self.
|
static |
Definition at line 353 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, NULL, quat_to_expmap(), self, and Vector_CreatePyObject().
|
static |
Definition at line 236 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, Matrix_CreatePyObject(), NULL, quat_to_mat3(), and self.
|
static |
Definition at line 299 of file mathutils_Quaternion.c.
References BaseMath_ReadCallback, NULL, PyTuple_SET_ITEMS, quat_split_swing_and_twist(), Quaternion_CreatePyObject(), ret, and self.
|
static |
Definition at line 72 of file mathutils_Quaternion.c.
References double_round(), QUAT_SIZE, ret, and self.
Referenced by Quaternion_repr().
|
static |
Definition at line 1363 of file mathutils_Quaternion.c.
|
static |
Definition at line 1549 of file mathutils_Quaternion.c.
|
static |
Definition at line 1549 of file mathutils_Quaternion.c.
|
static |
Definition at line 1369 of file mathutils_Quaternion.c.
|
static |
Definition at line 1350 of file mathutils_Quaternion.c.
PyTypeObject quaternion_Type |
Definition at line 1690 of file mathutils_Quaternion.c.
Referenced by PyInit_mathutils(), Quaternion_CreatePyObject(), and Quaternion_CreatePyObject_wrap().