Changeset 4622 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection/obb_tree.cc
- Timestamp:
- Jun 13, 2005, 6:25:54 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree.cc
r4618 r4622 26 26 27 27 28 Material* OBBTree::material = NULL;29 30 28 /** 31 29 \brief standard constructor … … 34 32 { 35 33 this->setClassID(CL_OBB_TREE, "OBBTree"); 36 material = new Material("Tree"); 37 material->setIllum(3); 38 material->setAmbient(1.0, 1.0, 1.0); 34 35 material = new Material*[3]; 36 for(int i = 0; i < 3; ++i) 37 { 38 material[i] = new Material(); 39 material[i]->setIllum(0); 40 } 41 material[0]->setAmbient(0.0, 0.3, 0.0); 42 material[1]->setAmbient(0.0, 0.0, 0.2); 43 material[2]->setAmbient(1.0, 0.0, 0.0); 39 44 } 40 45 … … 59 64 OBBTreeNode* node = new OBBTreeNode(); 60 65 this->rootNode = node; 66 this->rootNode->setTreeRef(this); 61 67 this->rootNode->spawnBVTree(depth, verticesList, length); 62 68 } … … 71 77 72 78 73 void OBBTree::drawBV(int currentDepth, const intdepth) const79 void OBBTree::drawBV(int depth) const 74 80 { 75 81 if( likely(this->rootNode != NULL)) 76 82 { 77 this->rootNode->drawBV( currentDepth);78 this->rootNode->drawBVPolygon( currentDepth);83 this->rootNode->drawBV(depth); 84 this->rootNode->drawBVPolygon(depth); 79 85 } 80 86 } 81 87 82 88 83 void OBBTree::drawBVPolygon(int currentDepth, const intdepth) const89 void OBBTree::drawBVPolygon(int depth) const 84 90 { 85 91 if( likely(this->rootNode != NULL)) 86 this->rootNode->drawBVPolygon( currentDepth);92 this->rootNode->drawBVPolygon(depth); 87 93 } 88 94 89 95 90 void OBBTree::drawBVBlended(int currentDepth, const intdepth) const96 void OBBTree::drawBVBlended(int depth) const 91 97 { 92 98 if( likely(this->rootNode != NULL)) 93 this->rootNode->drawBVBlended( currentDepth);99 this->rootNode->drawBVBlended(depth); 94 100 } 95 101
Note: See TracChangeset
for help on using the changeset viewer.