|
Blender V4.3
|
#include <algorithm>#include <Python.h>#include "mathutils.hh"#include "BLI_math_base_safe.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "../generic/py_capi_utils.hh"#include "../generic/python_utildefines.hh"#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: str\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: tuple[:class:`Vector`, float]\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" " :type axis: str\n" " :return: Swing, twist angle.\n" " :rtype: tuple[:class:`Quaternion`, float]\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` | :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") | |
| 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") | |
| 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 Py_ssize_t | Quaternion_len (QuaternionObject *) |
| static PyObject * | Quaternion_item (QuaternionObject *self, Py_ssize_t i) |
| static int | Quaternion_ass_item (QuaternionObject *self, Py_ssize_t 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 *) |
| PyDoc_STRVAR (Quaternion_angle_doc, "Angle of the quaternion.\n" "\n" ":type: float") | |
| static PyObject * | Quaternion_angle_get (QuaternionObject *self, void *) |
| static int | Quaternion_angle_set (QuaternionObject *self, PyObject *value, void *) |
| 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 *) |
| static int | Quaternion_axis_vector_set (QuaternionObject *self, PyObject *value, void *) |
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 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" " :arg seq: size 3 or 4\n" " :type seq: :class:`Vector`\n" " :arg 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 28 of file mathutils_Quaternion.cc.
Referenced by Quaternion_add(), Quaternion_ass_item(), Quaternion_ass_slice(), Quaternion_ass_subscript(), Quaternion_CreatePyObject(), Quaternion_cross(), Quaternion_dot(), Quaternion_hash(), Quaternion_imatmul(), Quaternion_imul(), Quaternion_item(), Quaternion_len(), Quaternion_make_compatible(), Quaternion_matmul(), 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_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" " :arg seq: size 3 or 4\n" " :type seq: :class:`Vector`\n" " :arg 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" | ) |
| 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" | ) |
| 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` | :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:tuple\n" | [:class:`Vector`, float] ) |
| 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: str\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" " :type axis:str\n" " :return:Swing | [ 'X', 'Y', 'Z'], | ||
| twist angle.\n" " :rtype:tuple\n" | [:class:`Quaternion`, float] ) |
|
static |
Definition at line 40 of file mathutils_Quaternion.cc.
References Quaternion_copy(), ret, and self.
Referenced by Quaternion_conjugated(), Quaternion_inverted(), and Quaternion_normalized().
Axis vector suffers from precision errors, use this function to ensure.
Definition at line 55 of file mathutils_Quaternion.cc.
References EXPP_FloatsAreEqual(), and is_zero_v3().
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 1190 of file mathutils_Quaternion.cc.
References copy_qt_qt(), mul_qt_fl(), and Quaternion_CreatePyObject().
Referenced by Quaternion_mul().
|
static |
Addition: object + object.
Definition at line 1136 of file mathutils_Quaternion.cc.
References add_qt_qtqt(), BaseMath_ReadCallback, q1, QUAT_SIZE, Quaternion_CreatePyObject(), and QuaternionObject_Check.
|
static |
Definition at line 1494 of file mathutils_Quaternion.cc.
References angle(), BaseMath_ReadCallback, normalize_qt_qt(), quat__axis_angle_sanitize(), safe_acosf(), and self.
|
static |
Definition at line 1512 of file mathutils_Quaternion.cc.
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 959 of file mathutils_Quaternion.cc.
References BaseMath_Prepare_ForWrite, BaseMath_WriteIndexCallback, float, QUAT_SIZE, and self.
Referenced by Quaternion_ass_subscript(), and Quaternion_axis_set().
|
static |
Sequence slice accessor (set): object[i:j] = x.
Definition at line 1021 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, CLAMP, mathutils_array_parse(), QUAT_SIZE, self, and size().
Referenced by Quaternion_ass_subscript().
|
static |
Sequence generic subscript (set): object[...] = x.
Definition at line 1097 of file mathutils_Quaternion.cc.
References QUAT_SIZE, Quaternion_ass_item(), Quaternion_ass_slice(), and self.
|
static |
Definition at line 1463 of file mathutils_Quaternion.cc.
References POINTER_AS_INT, Quaternion_item(), and self.
|
static |
Definition at line 1468 of file mathutils_Quaternion.cc.
References POINTER_AS_INT, Quaternion_ass_item(), and self.
|
static |
Definition at line 1554 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, normalize_qt_qt(), quat__axis_angle_sanitize(), quat_to_axis_angle(), self, and Vector_CreatePyObject().
|
static |
Definition at line 1573 of file mathutils_Quaternion.cc.
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 759 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, conjugate_qt(), and self.
Referenced by Quaternion_conjugated().
|
static |
Definition at line 779 of file mathutils_Quaternion.cc.
References quat__apply_to_copy(), Quaternion_conjugate(), and self.
|
static |
Definition at line 802 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, 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 1836 of file mathutils_Quaternion.cc.
References BASE_MATH_FLAG_DEFAULT, BASE_MATH_NEW, copy_qt_qt(), 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 1889 of file mathutils_Quaternion.cc.
References BLI_assert, Quaternion_CreatePyObject(), and self.
Referenced by pyrna_math_object_from_array().
| PyObject * Quaternion_CreatePyObject_wrap | ( | float | quat[4], |
| PyTypeObject * | base_type ) |
Definition at line 1872 of file mathutils_Quaternion.cc.
References BASE_MATH_FLAG_DEFAULT, BASE_MATH_FLAG_IS_WRAP, BASE_MATH_NEW, quaternion_Type, and self.
|
static |
Definition at line 400 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, mathutils_array_parse(), mul_qt_qtqt(), QUAT_SIZE, Quaternion_CreatePyObject(), and self.
|
static |
Definition at line 810 of file mathutils_Quaternion.cc.
References PyC_CheckArgs_DeepCopy(), Quaternion_copy(), and self.
|
static |
Definition at line 436 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, dot_qtqt(), mathutils_array_parse(), QUAT_SIZE, and self.
|
static |
Definition at line 912 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, BaseMathObject_Prepare_ForHash, mathutils_array_hash(), QUAT_SIZE, and self.
|
static |
Definition at line 711 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, self, and unit_qt().
|
static |
Multiplication in-place (quaternion multiply): object @= object.
Definition at line 1338 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, BaseMath_WriteCallback, copy_qt_qt(), mul_qt_qtqt(), q1, QUAT_SIZE, and QuaternionObject_Check.
|
static |
Multiplication in-place (element-wise or scalar): object *= object.
Definition at line 1243 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, BaseMath_WriteCallback, mul_qt_fl(), mul_vn_vn(), q1, QUAT_SIZE, and QuaternionObject_Check.
|
static |
Definition at line 674 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, invert_qt(), and self.
Referenced by Quaternion_inverted().
|
static |
Definition at line 694 of file mathutils_Quaternion.cc.
References quat__apply_to_copy(), Quaternion_invert(), and self.
|
static |
Sequence accessor (get): x = object[i].
Definition at line 938 of file mathutils_Quaternion.cc.
References BaseMath_ReadIndexCallback, QUAT_SIZE, and self.
Referenced by Quaternion_axis_get(), and Quaternion_subscript().
|
static |
Sequence length: len(object).
Definition at line 932 of file mathutils_Quaternion.cc.
References QUAT_SIZE.
|
static |
Definition at line 1479 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, dot_qtqt(), self, and sqrtf.
|
static |
Definition at line 591 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, mathutils_array_parse(), mul_qt_fl(), normalize_qt_qt(), QUAT_SIZE, quat_to_compatible_quat(), and self.
|
static |
Multiplication (quaternion multiply): object @ object.
Definition at line 1283 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, copy_v3_v3(), mul_qt_qtqt(), mul_qt_v3(), 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 1199 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, mul_vn_vnvn(), q1, quat_mul_float(), QUAT_SIZE, Quaternion_CreatePyObject(), and QuaternionObject_Check.
|
static |
Negative (returns the negative of this object): -object.
Definition at line 1375 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, negate_v4_v4(), QUAT_SIZE, Quaternion_CreatePyObject(), and self.
|
static |
Definition at line 735 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, mul_qt_fl(), and self.
|
static |
Definition at line 107 of file mathutils_Quaternion.cc.
References angle_wrap_rad(), axis_angle_to_quat(), BLI_assert, expmap_to_quat(), mathutils_array_parse(), QUAT_SIZE, Quaternion_CreatePyObject(), size(), and unit_qt().
|
static |
Definition at line 634 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, normalize_qt(), and self.
Referenced by Quaternion_normalized().
|
static |
Definition at line 654 of file mathutils_Quaternion.cc.
References quat__apply_to_copy(), Quaternion_normalize(), and self.
|
static |
Definition at line 824 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, Quaternion_to_tuple_ext(), ret, and self.
|
static |
Definition at line 868 of file mathutils_Quaternion.cc.
References ATTR_FALLTHROUGH, b, BaseMath_ReadCallback, EXPP_VectorsAreEqual(), QUAT_SIZE, and QuaternionObject_Check.
|
static |
Definition at line 561 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback_ForWrite, BaseMath_WriteCallback, length(), mat3_to_quat(), mathutils_any_to_rotmat(), mul_m3_m3m3(), mul_qt_fl(), normalize_qt_qt(), quat_to_mat3(), and self.
|
static |
Definition at line 470 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, mathutils_array_parse(), QUAT_SIZE, Quaternion_CreatePyObject(), rotation_between_quats_to_quat(), and self.
|
static |
Definition at line 511 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, interp_qt_qtqt(), mathutils_array_parse(), QUAT_SIZE, Quaternion_CreatePyObject(), and self.
|
static |
Sequence slice accessor (get): x = object[i:j].
Definition at line 996 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, CLAMP, count, QUAT_SIZE, and self.
Referenced by Quaternion_subscript().
|
static |
Definition at line 841 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, BLI_dynstr_appendf(), BLI_dynstr_new(), mathutils_dynstr_to_py(), and self.
|
static |
Subtraction: object - object.
Definition at line 1161 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, q1, QUAT_SIZE, Quaternion_CreatePyObject(), QuaternionObject_Check, and x.
|
static |
Sequence generic subscript (get): x = object[...].
Definition at line 1060 of file mathutils_Quaternion.cc.
References QUAT_SIZE, Quaternion_item(), Quaternion_slice(), and self.
|
static |
Definition at line 275 of file mathutils_Quaternion.cc.
References angle(), BaseMath_ReadCallback, normalize_qt_qt(), PyTuple_SET_ITEMS, quat__axis_angle_sanitize(), quat_to_axis_angle(), ret, self, and Vector_CreatePyObject().
|
static |
Definition at line 183 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, Euler_CreatePyObject(), euler_order_from_string(), EULER_ORDER_XYZ, euler_Type, normalize_qt_qt(), quat_to_compatible_eul(), quat_to_compatible_eulO(), quat_to_eul(), quat_to_eulO(), and self.
|
static |
Definition at line 371 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, quat_to_expmap(), self, and Vector_CreatePyObject().
|
static |
Definition at line 248 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, Matrix_CreatePyObject(), quat_to_mat3(), and self.
|
static |
Definition at line 316 of file mathutils_Quaternion.cc.
References BaseMath_ReadCallback, PyTuple_SET_ITEMS, quat_split_swing_and_twist(), Quaternion_CreatePyObject(), ret, and self.
|
static |
Definition at line 80 of file mathutils_Quaternion.cc.
References double_round(), QUAT_SIZE, ret, and self.
Referenced by Quaternion_repr().
|
static |
Definition at line 1406 of file mathutils_Quaternion.cc.
|
static |
Definition at line 1610 of file mathutils_Quaternion.cc.
|
static |
Definition at line 1680 of file mathutils_Quaternion.cc.
|
static |
Definition at line 1412 of file mathutils_Quaternion.cc.
|
static |
Definition at line 1393 of file mathutils_Quaternion.cc.
| PyTypeObject quaternion_Type |
Definition at line 1774 of file mathutils_Quaternion.cc.
Referenced by PyInit_mathutils(), Quaternion_CreatePyObject(), and Quaternion_CreatePyObject_wrap().