Blender  V2.93
mathutils_Vector.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 extern PyTypeObject vector_Type;
24 
25 #define VectorObject_Check(v) PyObject_TypeCheck((v), &vector_Type)
26 #define VectorObject_CheckExact(v) (Py_TYPE(v) == &vector_Type)
27 
28 typedef struct {
30 
31  int size; /* vec size 2 or more */
32 } VectorObject;
33 
34 /*prototypes*/
35 PyObject *Vector_CreatePyObject(const float *vec,
36  const int size,
37  PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
38 PyObject *Vector_CreatePyObject_wrap(float *vec,
39  const int size,
40  PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
41  ATTR_NONNULL(1);
42 PyObject *Vector_CreatePyObject_cb(PyObject *user,
43  int size,
44  unsigned char cb_type,
45  unsigned char subtype) ATTR_WARN_UNUSED_RESULT;
46 PyObject *Vector_CreatePyObject_alloc(float *vec,
47  const int size,
48  PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
49  ATTR_NONNULL(1);
#define ATTR_NONNULL(...)
void BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() ATTR_WARN_UNUSED_RESULT
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
PyObject * Vector_CreatePyObject(const float *vec, const int size, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
PyTypeObject vector_Type
PyObject * Vector_CreatePyObject_cb(PyObject *user, int size, unsigned char cb_type, unsigned char subtype) ATTR_WARN_UNUSED_RESULT
PyObject * Vector_CreatePyObject_wrap(float *vec, const int size, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
PyObject * Vector_CreatePyObject_alloc(float *vec, const int size, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BASE_MATH_MEMBERS(vec)