Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.h @ 4901

Last change on this file since 4901 was 4901, checked in by patrick, 19 years ago

orxonox/trunk: added indexing algorithm and material drawing functions

File size: 961 bytes
Line 
1/*!
2    \file quadtree.h
3  *  Definition of a spatial data separation using quadtree
4
5*/
6
7#ifndef _QUADTREE_H
8#define _QUADTREE_H
9
10
11#include "base_object.h"
12#include "abstract_model.h"
13
14
15class QuadtreeNode;
16class Material;
17
18//! A class for quadtree separation of the world
19class Quadtree : public BaseObject {
20
21 public:
22  Quadtree(modelInfo* pModelInfo, const int treeDepth);
23  virtual ~Quadtree();
24
25  void drawTree(int depth, int drawMode) const;
26
27  Material* getMaterial(int indexNode) { return this->materials[indexNode%4]; }
28
29 private:
30   QuadtreeNode*                   rootNode;              //!< reference to the root node of the quadtree
31   modelInfo*                      pModelInfo;            //!< reference to the modelInfo of the object
32   int                             treeDepth;             //!< depth of the tree
33
34   Material**                       materials;            //!< materials for debug drawing purposes
35};
36
37#endif /* _QUADTREE_H */
Note: See TracBrowser for help on using the repository browser.