diff -r 2a853d284a6a -r 64638385798a include/octree.h --- a/include/octree.h Thu May 15 19:15:57 2008 +0200 +++ b/include/octree.h Mon May 19 22:59:04 2008 +0200 @@ -77,14 +77,23 @@ const int max_depth; bool built; public: + /** default constructor, + * maximum depth of tree is set to 10 */ Octree() : Container(), root(NULL), max_depth(10), built(false) {}; + + /** constructor + * @param[in] maxdepth maximum depth of the tree */ Octree(int maxdepth) : Container(), root(NULL), max_depth(maxdepth), built(false) {}; ~Octree() { if (root) delete root; }; void addShape(const Shape* aShape) { Container::addShape(aShape); built = false; }; const Shape *nearest_intersection(const Shape *origin_shape, const Ray &ray, Float &nearest_distance); void optimize() { build(); }; + + /** build the octree + * this is alias of optimize() */ void build(); + void save(ostream &str, OctreeNode *node = NULL) {}; void load(istream &str, OctreeNode *node = NULL) {}; };