diff -r 062b1c4143f7 -r 907929fa9b59 src/kdtree.cc --- a/src/kdtree.cc Wed Apr 23 14:39:33 2008 +0200 +++ b/src/kdtree.cc Wed Apr 23 19:35:03 2008 +0200 @@ -412,7 +412,7 @@ } } -istream & KdTree::load(istream &st) +istream & KdTree::load(istream &st, Material *mat) { string s; istringstream is; @@ -421,6 +421,8 @@ if (s.compare("(kdtree") != 0) return st; + dbgmsg(1, "* loading kd-tree\n"); + shapes.clear(); if (root) delete root; root = new KdNode(); @@ -433,7 +435,7 @@ Shape *shape; for (int i = 0; i < shape_count; i++) { - shape = loadShape(st); + shape = loadShape(st, mat); Container::addShape(shape); getline(st, s, ','); }