equal
deleted
inserted
replaced
268 children[1].subdivide(rbb, maxdepth-1); |
268 children[1].subdivide(rbb, maxdepth-1); |
269 } |
269 } |
270 |
270 |
271 void KdTree::build() |
271 void KdTree::build() |
272 { |
272 { |
273 infomsg("* building kd-tree\n"); |
273 dbgmsg(1, "* building kd-tree\n"); |
274 root = new KdNode(); |
274 root = new KdNode(); |
275 ShapeList::iterator shape; |
275 ShapeList::iterator shape; |
276 for (shape = shapes.begin(); shape != shapes.end(); shape++) |
276 for (shape = shapes.begin(); shape != shapes.end(); shape++) |
277 root->addShape(*shape); |
277 root->addShape(*shape); |
278 root->subdivide(bbox, max_depth); |
278 root->subdivide(bbox, max_depth); |