src/raytracermodule.cc
branchpyrit
changeset 84 6f7fe14782c2
parent 78 9569e9f35374
child 89 fcf1487b398b
equal deleted inserted replaced
83:e3a2a5b26abb 84:6f7fe14782c2
    26 
    26 
    27 #include <Python.h>
    27 #include <Python.h>
    28 
    28 
    29 #include <vector>
    29 #include <vector>
    30 #include "raytracer.h"
    30 #include "raytracer.h"
    31 #include "octree.h"
    31 #include "kdtree.h"
    32 
    32 
    33 //=========================== Light Source Object ===========================
    33 //=========================== Light Source Object ===========================
    34 
    34 
    35 typedef struct {
    35 typedef struct {
    36 	PyObject_HEAD
    36 	PyObject_HEAD
   758 
   758 
   759 	v = PyObject_New(RaytracerObject, &RaytracerType);
   759 	v = PyObject_New(RaytracerObject, &RaytracerType);
   760 	v->raytracer = new Raytracer();
   760 	v->raytracer = new Raytracer();
   761 	v->children = new vector<PyObject*>();
   761 	v->children = new vector<PyObject*>();
   762 	v->raytracer->setCamera(new Camera());
   762 	v->raytracer->setCamera(new Camera());
   763 	v->raytracer->setTop(new Octree());
   763 	v->raytracer->setTop(new KdTree());
   764 
   764 
   765 	return (PyObject*)v;
   765 	return (PyObject*)v;
   766 }
   766 }
   767 
   767 
   768 static void Raytracer_Destructor(PyObject* self)
   768 static void Raytracer_Destructor(PyObject* self)