4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
21 * All rights reserved.
23 * The Original Code is: all of this file.
25 * Contributor(s): Joseph Gilbert
27 * ***** END GPL LICENSE BLOCK *****
35 #include "../intern/bpy_compat.h"
37 extern PyTypeObject quaternion_Type;
39 #define QuaternionObject_Check(v) (Py_TYPE(v) == &quaternion_Type)
41 typedef struct { /* keep aligned with BaseMathObject in Mathutils.h */
43 float *quat; /* 1D array of data (alias) */
44 PyObject *cb_user; /* if this vector references another object, otherwise NULL, *Note* this owns its reference */
45 unsigned char cb_type; /* which user funcs do we adhere to, RNA, GameObject, etc */
46 unsigned char cb_subtype; /* subtype: location, rotation... to avoid defining many new functions for every attribute of the same type */
47 unsigned char wrapped; /* wrapped data type? */
48 /* end BaseMathObject */
52 /*struct data contains a pointer to the actual data that the
53 object uses. It can use either PyMem allocated data (which will
54 be stored in py_data) or be a wrapper for data allocated through
55 blender (stored in blend_data). This is an either/or struct not both*/
58 PyObject *newQuaternionObject( float *quat, int type );
59 PyObject *newQuaternionObject_cb(PyObject *cb_user, int cb_type, int cb_subtype);
61 #endif /* EXPP_quat_h */