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/vector.h | |
parent | 910b0f2cda7b8ca45bf16d429bb8df986e69ce1f (diff) |
Roll back changes from Big Mathutils Commit on 2005/05/20.
Diffstat (limited to 'source/blender/python/api2_2x/vector.h')
-rw-r--r-- | source/blender/python/api2_2x/vector.h | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/source/blender/python/api2_2x/vector.h b/source/blender/python/api2_2x/vector.h index 048fa1df8bc..40e5851359a 100644 --- a/source/blender/python/api2_2x/vector.h +++ b/source/blender/python/api2_2x/vector.h @@ -33,34 +33,40 @@ #ifndef EXPP_vector_h #define EXPP_vector_h +#include "Python.h" +#include "gen_utils.h" +#include "Types.h" +#include "matrix.h" +#include "BKE_utildefines.h" + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +/*****************************/ +// Vector Python Object +/*****************************/ + #define VectorObject_Check(v) ((v)->ob_type == &vector_Type) typedef struct { - PyObject_VAR_HEAD - struct{ - float *py_data; //python managed - float *blend_data; //blender managed - }data; - float *vec; //1D array of data (alias) + PyObject_VAR_HEAD float *vec; int size; - PyObject *coerced_object; + int flag; + //0 - no coercion + //1 - coerced from int + //2 - coerced from float + int delete_pymem; /* flag to delete the memory vec points at */ } VectorObject; -/*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 *newVectorObject( float *vec, int size ); +PyObject *newVectorProxy( float *vec, int size ); PyObject *Vector_Zero( VectorObject * self ); PyObject *Vector_Normalize( VectorObject * self ); PyObject *Vector_Negate( VectorObject * self ); PyObject *Vector_Resize2D( VectorObject * self ); PyObject *Vector_Resize3D( VectorObject * self ); PyObject *Vector_Resize4D( VectorObject * self ); -PyObject *newVectorObject(float *vec, int size, int type); #endif /* EXPP_vector_h */ |