summaryrefslogtreecommitdiffstats
path: root/libdimension-python/dimension.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension-python/dimension.c')
-rw-r--r--libdimension-python/dimension.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/libdimension-python/dimension.c b/libdimension-python/dimension.c
index 03e2aaa..0ebdab3 100644
--- a/libdimension-python/dimension.c
+++ b/libdimension-python/dimension.c
@@ -19,11 +19,6 @@
*************************************************************************/
#include "dimension-python.h"
-#include "Vector.h"
-#include "Matrix.h"
-#include "Color.h"
-#include "Canvas.h"
-#include "Scene.h"
static PyObject *
dmnsn_py_dieOnWarnings(PyObject *self, PyObject *args)
@@ -50,12 +45,12 @@ static PyMethodDef DimensionMethods[] = {
{ "dot", dmnsn_py_Vector_dot, METH_VARARGS, "Dot product." },
{ "proj", dmnsn_py_Vector_proj, METH_VARARGS, "Vector projection." },
- { "scale", (PyCFunction)dmnsn_py_Matrix_scale,
- METH_VARARGS | METH_KEYWORDS, "Scaling." },
- { "translate", (PyCFunction)dmnsn_py_Matrix_translate,
- METH_VARARGS | METH_KEYWORDS, "Translation." },
- { "rotate", (PyCFunction)dmnsn_py_Matrix_rotate,
- METH_VARARGS | METH_KEYWORDS, "Rotation." },
+ { "scale", (PyCFunction)dmnsn_py_Matrix_scale, METH_VARARGS,
+ "Scaling." },
+ { "translate", (PyCFunction)dmnsn_py_Matrix_translate, METH_VARARGS,
+ "Translation." },
+ { "rotate", (PyCFunction)dmnsn_py_Matrix_rotate, METH_VARARGS,
+ "Rotation." },
{ NULL, NULL, 0, NULL }
};
@@ -75,6 +70,10 @@ PyInit_dimension(void)
|| !dmnsn_py_init_MatrixType()
|| !dmnsn_py_init_ColorType()
|| !dmnsn_py_init_CanvasType()
+ || !dmnsn_py_init_CameraType()
+ || !dmnsn_py_init_PerspectiveCameraType()
+ || !dmnsn_py_init_ObjectType()
+ || !dmnsn_py_init_SphereType()
|| !dmnsn_py_init_SceneType())
return NULL;
@@ -108,6 +107,13 @@ PyInit_dimension(void)
PyModule_AddObject(module, "Canvas", (PyObject *)&dmnsn_py_CanvasType);
+ PyModule_AddObject(module, "Camera", (PyObject *)&dmnsn_py_CanvasType);
+ PyModule_AddObject(module, "PerspectiveCamera",
+ (PyObject *)&dmnsn_py_PerspectiveCameraType);
+
+ PyModule_AddObject(module, "Object", (PyObject *)&dmnsn_py_ObjectType);
+ PyModule_AddObject(module, "Sphere", (PyObject *)&dmnsn_py_SphereType);
+
PyModule_AddObject(module, "Scene", (PyObject *)&dmnsn_py_SceneType);
return module;