summaryrefslogtreecommitdiffstats
path: root/libdimension-python/Matrix.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-22 14:22:07 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-22 14:22:07 -0600
commit1bf306d4d93cc21c220a3f31835023e49e84dd2d (patch)
tree436959a8321100a3c36e8eef9a19279cb446e1fa /libdimension-python/Matrix.c
parent0f0b704144bddc045657f7ed852b49d5e349b0bd (diff)
downloaddimension-1bf306d4d93cc21c220a3f31835023e49e84dd2d.tar.xz
Add cameras, objects, and spheres to Python module.
Diffstat (limited to 'libdimension-python/Matrix.c')
-rw-r--r--libdimension-python/Matrix.c15
1 files changed, 7 insertions, 8 deletions
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 @@
* <http://www.gnu.org/licenses/>. *
*************************************************************************/
-#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);