/*! \file quadtree.h * Definition of a spatial data separation using quadtree */ #ifndef _QUADTREE_H #define _QUADTREE_H #include "base_object.h" #include "abstract_model.h" class QuadtreeNode; class Material; //! A class for quadtree separation of the world class Quadtree : public BaseObject { public: Quadtree(modelInfo* pModelInfo, const int treeDepth); virtual ~Quadtree(); void drawTree(int depth, int drawMode) const; Material* getMaterial(int indexNode) { return this->materials[indexNode%4]; } private: QuadtreeNode* rootNode; //!< reference to the root node of the quadtree modelInfo* pModelInfo; //!< reference to the modelInfo of the object int treeDepth; //!< depth of the tree Material** materials; //!< materials for debug drawing purposes }; #endif /* _QUADTREE_H */