Blender V4.5
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
31PyObject *Quaternion_CreatePyObject(const float quat[4],
32 PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
33PyObject *Quaternion_CreatePyObject_wrap(float quat[4],
34 PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
35 ATTR_NONNULL(1);
36PyObject *Quaternion_CreatePyObject_cb(PyObject *cb_user,
37 unsigned char cb_type,
38 unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
PyTypeObject quaternion_Type
PyObject * Quaternion_CreatePyObject(const float quat[4], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
PyObject * Quaternion_CreatePyObject_cb(PyObject *cb_user, unsigned char cb_type, unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT
PyObject * Quaternion_CreatePyObject_wrap(float quat[4], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)