Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Swaney <sswaney@centurytel.net>2005-05-22 21:40:00 +0400
committerStephen Swaney <sswaney@centurytel.net>2005-05-22 21:40:00 +0400
commitece00ff04a90aa0aaa37f27185c25b0f7b19e77d (patch)
tree7c1143535c4828b4ca87ddda22df9fd4950e4607 /source/blender/python/api2_2x/matrix.h
parent910b0f2cda7b8ca45bf16d429bb8df986e69ce1f (diff)
Roll back changes from Big Mathutils Commit on 2005/05/20.
Diffstat (limited to 'source/blender/python/api2_2x/matrix.h')
-rw-r--r--source/blender/python/api2_2x/matrix.h43
1 files changed, 24 insertions, 19 deletions
diff --git a/source/blender/python/api2_2x/matrix.h b/source/blender/python/api2_2x/matrix.h
index 9c114867786..b40ec978159 100644
--- a/source/blender/python/api2_2x/matrix.h
+++ b/source/blender/python/api2_2x/matrix.h
@@ -33,31 +33,37 @@
#ifndef EXPP_matrix_h
#define EXPP_matrix_h
-#define MatrixObject_Check(v) ((v)->ob_type == &matrix_Type)
+#include "Python.h"
+#include "BLI_arithb.h"
+#include "vector.h"
+#include "gen_utils.h"
+#include "Types.h"
+#include "quat.h"
+#include "euler.h"
+#define Matrix_CheckPyObject(v) ((v)->ob_type == &matrix_Type)
+
+/*****************************/
+/* Matrix Python Object */
+/*****************************/
typedef float **ptRow;
+
typedef struct _Matrix {
- PyObject_VAR_HEAD
- struct{
- float *py_data; //python managed
- float *blend_data; //blender managed
- }data;
- ptRow matrix; //ptr to the contigPtr (accessor)
- float *contigPtr; //1D array of data (alias)
+ PyObject_VAR_HEAD /* standard python macro */
+ ptRow matrix;
+ float *contigPtr;
int rowSize;
int colSize;
- PyObject *coerced_object;
+ int flag;
+ //0 - no coercion
+ //1 - coerced from int
+ //2 - coerced from float
} MatrixObject;
-/*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
+/*****************************************************************************/
+/* Python API function prototypes. */
+/*****************************************************************************/
+PyObject *newMatrixObject( float *mat, int rowSize, int colSize );
PyObject *Matrix_Zero( MatrixObject * self );
PyObject *Matrix_Identity( MatrixObject * self );
PyObject *Matrix_Transpose( MatrixObject * self );
@@ -68,6 +74,5 @@ PyObject *Matrix_RotationPart( MatrixObject * self );
PyObject *Matrix_Resize4x4( MatrixObject * self );
PyObject *Matrix_toEuler( MatrixObject * self );
PyObject *Matrix_toQuat( MatrixObject * self );
-PyObject *newMatrixObject(float *mat, int rowSize, int colSize, int type);
#endif /* EXPP_matrix_H */