src/raytracermodule.cc
branchpyrit
changeset 36 b490093b0ac3
parent 35 fb170fccb19f
child 44 3763b26244f0
equal deleted inserted replaced
35:fb170fccb19f 36:b490093b0ac3
     9 #include <Python.h>
     9 #include <Python.h>
    10 
    10 
    11 #include <vector>
    11 #include <vector>
    12 #include "raytracer.h"
    12 #include "raytracer.h"
    13 #include "scene.h"
    13 #include "scene.h"
    14 #include "kdtree.h"
    14 #include "octree.h"
    15 
    15 
    16 //=========================== Light Source Object ===========================
    16 //=========================== Light Source Object ===========================
    17 
    17 
    18 typedef struct {
    18 typedef struct {
    19 	PyObject_HEAD
    19 	PyObject_HEAD
   569 
   569 
   570 	v = PyObject_New(RaytracerObject, &RaytracerType);
   570 	v = PyObject_New(RaytracerObject, &RaytracerType);
   571 	v->raytracer = new Raytracer();
   571 	v->raytracer = new Raytracer();
   572 	v->children = new vector<PyObject*>();
   572 	v->children = new vector<PyObject*>();
   573 	v->raytracer->setCamera(new Camera());
   573 	v->raytracer->setCamera(new Camera());
   574 	v->raytracer->setTop(new KdTree());
   574 	v->raytracer->setTop(new Octree());
   575 
   575 
   576 	return (PyObject*)v;
   576 	return (PyObject*)v;
   577 }
   577 }
   578 
   578 
   579 static void Raytracer_Destructor(PyObject* self)
   579 static void Raytracer_Destructor(PyObject* self)