diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2005-05-22 21:40:00 +0400 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2005-05-22 21:40:00 +0400 |
commit | ece00ff04a90aa0aaa37f27185c25b0f7b19e77d (patch) | |
tree | 7c1143535c4828b4ca87ddda22df9fd4950e4607 /source/blender/python/api2_2x/quat.h | |
parent | 910b0f2cda7b8ca45bf16d429bb8df986e69ce1f (diff) |
Roll back changes from Big Mathutils Commit on 2005/05/20.
Diffstat (limited to 'source/blender/python/api2_2x/quat.h')
-rw-r--r-- | source/blender/python/api2_2x/quat.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/source/blender/python/api2_2x/quat.h b/source/blender/python/api2_2x/quat.h index 8be94ef3f42..a04e0ee7c37 100644 --- a/source/blender/python/api2_2x/quat.h +++ b/source/blender/python/api2_2x/quat.h @@ -34,27 +34,34 @@ #ifndef EXPP_quat_h #define EXPP_quat_h +#include "Python.h" +#include "gen_utils.h" +#include "Types.h" +#include <BLI_arithb.h> +#include "euler.h" +#include "matrix.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +/*****************************/ +// Quaternion Python Object +/*****************************/ + #define QuaternionObject_Check(v) ((v)->ob_type == &quaternion_Type) typedef struct { - PyObject_VAR_HEAD - struct{ - float *py_data; //python managed - float *blend_data; //blender managed - }data; - float *quat; //1D array of data (alias) - PyObject *coerced_object; + PyObject_VAR_HEAD float *quat; + int flag; + //0 - no coercion + //1 - coerced from int + //2 - coerced from float } QuaternionObject; -/*coerced_object is a pointer to the object that it was -coerced from when a dummy vector needs to be created from -the coerce() function for numeric protocol operations*/ -/*struct data contains a pointer to the actual data that the -object uses. It can use either PyMem allocated data (which will -be stored in py_data) or be a wrapper for data allocated through -blender (stored in blend_data). This is an either/or struct not both*/ //prototypes +PyObject *newQuaternionObject( float *quat ); PyObject *Quaternion_Identity( QuaternionObject * self ); PyObject *Quaternion_Negate( QuaternionObject * self ); PyObject *Quaternion_Conjugate( QuaternionObject * self ); @@ -62,6 +69,5 @@ PyObject *Quaternion_Inverse( QuaternionObject * self ); PyObject *Quaternion_Normalize( QuaternionObject * self ); PyObject *Quaternion_ToEuler( QuaternionObject * self ); PyObject *Quaternion_ToMatrix( QuaternionObject * self ); -PyObject *newQuaternionObject( float *quat, int type ); #endif /* EXPP_quat_h */ |