Changeset 4907 in orxonox.OLD for orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc
- Timestamp:
- Jul 20, 2005, 9:33:10 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc
r4902 r4907 33 33 this->treeDepth = treeDepth; 34 34 35 /* initialize the materials for debug draw */ 35 36 this->materials = new Material*[4]; 36 37 for(int i = 0; i < 4; ++i) … … 44 45 materials[3]->setAmbient(5.0, 3.0, 1.0); 45 46 47 /* build the tree */ 48 this->rootNode = new QuadtreeNode(this->pModelInfo, this, this->treeDepth); 46 49 47 this->rootNode = new QuadtreeNode(this->pModelInfo, this, this->treeDepth); 50 /* make an array with access to the leafs of the Quad-Tree */ 51 this->nodes = new QuadtreeNode*[(int)pow(4, treeDepth)]; 48 52 } 49 53 … … 56 60 { 57 61 // delete what has to be deleted here 62 delete [] this->nodes; 63 delete this->rootNode; 58 64 } 59 65
Note: See TracChangeset
for help on using the changeset viewer.