Changeset 4901 in orxonox.OLD for orxonox/trunk/src/lib/graphics/spatial_separation
- Timestamp:
- Jul 19, 2005, 10:35:26 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/spatial_separation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc
r4898 r4901 18 18 #include "quadtree.h" 19 19 #include "quadtree_node.h" 20 #include "material.h" 20 21 21 22 using namespace std; … … 31 32 this->pModelInfo = pModelInfo; 32 33 this->treeDepth = treeDepth; 34 35 this->materials = new Material*[4]; 36 37 for(int i = 0; i < 4; ++i) 38 { 39 materials[i] = new Material(); 40 materials[i]->setIllum(3); 41 } 42 materials[0]->setAmbient(0.0, 0.3, 0.0); 43 materials[1]->setAmbient(0.4, 0.0, 0.2); 44 materials[2]->setAmbient(1.0, 0.0, 0.0); 45 materials[3]->setAmbient(5.0, 3.0, 1.0); 46 33 47 34 48 this->rootNode = new QuadtreeNode(this->pModelInfo, this->treeDepth); -
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.h
r4900 r4901 25 25 void drawTree(int depth, int drawMode) const; 26 26 27 Material* getMaterial(int indexNode) { return this->materials[indexNode%4]; } 28 27 29 private: 28 30 QuadtreeNode* rootNode; //!< reference to the root node of the quadtree 29 31 modelInfo* pModelInfo; //!< reference to the modelInfo of the object 30 32 int treeDepth; //!< depth of the tree 33 34 Material** materials; //!< materials for debug drawing purposes 31 35 }; 32 36
Note: See TracChangeset
for help on using the changeset viewer.