Blender V5.0
mathutils_Quaternion.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include <Python.h>
12
13#include "mathutils.hh"
14
15extern PyTypeObject quaternion_Type;
16
17#define QuaternionObject_Check(v) PyObject_TypeCheck((v), &quaternion_Type)
18#define QuaternionObject_CheckExact(v) (Py_TYPE(v) == &quaternion_Type)
19
23
24/* struct data contains a pointer to the actual data that the
25 * object uses. It can use either PyMem allocated data (which will
26 * be stored in py_data) or be a wrapper for data allocated through
27 * blender (stored in blend_data). This is an either/or struct not both */
28
29/* Prototypes. */
30
31[[nodiscard]] PyObject *Quaternion_CreatePyObject(const float quat[4], PyTypeObject *base_type);
32[[nodiscard]] PyObject *Quaternion_CreatePyObject_wrap(float quat[4], PyTypeObject *base_type)
33 ATTR_NONNULL(1);
34[[nodiscard]] PyObject *Quaternion_CreatePyObject_cb(PyObject *cb_user,
35 unsigned char cb_type,
36 unsigned char cb_subtype);
#define ATTR_NONNULL(...)
PyTypeObject quaternion_Type
PyObject * Quaternion_CreatePyObject_wrap(float quat[4], PyTypeObject *base_type) ATTR_NONNULL(1)
PyObject * Quaternion_CreatePyObject(const float quat[4], PyTypeObject *base_type)
PyObject * Quaternion_CreatePyObject_cb(PyObject *cb_user, unsigned char cb_type, unsigned char cb_subtype)