From 1bf306d4d93cc21c220a3f31835023e49e84dd2d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 22 May 2011 14:22:07 -0600 Subject: Add cameras, objects, and spheres to Python module. --- libdimension-python/Matrix.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'libdimension-python/Matrix.c') diff --git a/libdimension-python/Matrix.c b/libdimension-python/Matrix.c index b18b2d7..0219965 100644 --- a/libdimension-python/Matrix.c +++ b/libdimension-python/Matrix.c @@ -18,8 +18,7 @@ * . * *************************************************************************/ -#include "Vector.h" -#include "Matrix.h" +#include "dimension-python.h" static int dmnsn_py_Matrix_init(dmnsn_py_Matrix *self, PyObject *args, PyObject *kwds) @@ -42,10 +41,10 @@ dmnsn_py_Matrix_init(dmnsn_py_Matrix *self, PyObject *args, PyObject *kwds) } PyObject * -dmnsn_py_Matrix_scale(PyObject *self, PyObject *args, PyObject *kwds) +dmnsn_py_Matrix_scale(PyObject *self, PyObject *args) { dmnsn_vector scale; - if (!dmnsn_py_Vector_args(&scale, args, kwds)) + if (!PyArg_ParseTuple(args, "O&", dmnsn_py_VectorParse, &scale)) return NULL; dmnsn_py_Matrix *ret = PyObject_New(dmnsn_py_Matrix, &dmnsn_py_MatrixType); @@ -56,10 +55,10 @@ dmnsn_py_Matrix_scale(PyObject *self, PyObject *args, PyObject *kwds) } PyObject * -dmnsn_py_Matrix_translate(PyObject *self, PyObject *args, PyObject *kwds) +dmnsn_py_Matrix_translate(PyObject *self, PyObject *args) { dmnsn_vector translate; - if (!dmnsn_py_Vector_args(&translate, args, kwds)) + if (!PyArg_ParseTuple(args, "O&", dmnsn_py_VectorParse, &translate)) return NULL; dmnsn_py_Matrix *ret = PyObject_New(dmnsn_py_Matrix, &dmnsn_py_MatrixType); @@ -70,10 +69,10 @@ dmnsn_py_Matrix_translate(PyObject *self, PyObject *args, PyObject *kwds) } PyObject * -dmnsn_py_Matrix_rotate(PyObject *self, PyObject *args, PyObject *kwds) +dmnsn_py_Matrix_rotate(PyObject *self, PyObject *args) { dmnsn_vector rotate; - if (!dmnsn_py_Vector_args(&rotate, args, kwds)) + if (!PyArg_ParseTuple(args, "O&", dmnsn_py_VectorParse, &rotate)) return NULL; dmnsn_py_Matrix *ret = PyObject_New(dmnsn_py_Matrix, &dmnsn_py_MatrixType); -- cgit v1.2.3