Changeset 4889 in orxonox.OLD
- Timestamp:
- Jul 18, 2005, 10:27:16 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc
r4887 r4889 76 76 */ 77 77 void Quadtree::drawTree(int depth, int drawMode) const 78 {} 78 { 79 this->rootNode->drawTree(depth, drawMode); 80 } -
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r4888 r4889 261 261 Vector t1 = *this->pDimension->getCenter(); 262 262 float ax = this->pDimension->getAxis(); 263 float h = 0.0f;263 float h = 50.0f; 264 264 265 265 glBegin(GL_QUADS); 266 glVertex3f(t1.x + ax, h , t1.z + ax);267 glVertex3f(t1.x - ax, h , t1.z + ax);268 glVertex3f(t1.x - ax, h , t1.z - ax);269 glVertex3f(t1.x + ax, h , t1.z - ax);266 glVertex3f(t1.x + ax, h - depth * 10.0f, t1.z + ax); 267 glVertex3f(t1.x - ax, h - depth * 10.0f, t1.z + ax); 268 glVertex3f(t1.x - ax, h - depth * 10.0f, t1.z - ax); 269 glVertex3f(t1.x + ax, h - depth * 10.0f, t1.z - ax); 270 270 glEnd(); 271 272 if( this->nodeA != NULL) 273 this->nodeA->drawTree(depth - 1, drawMode); 274 if( this->nodeB != NULL) 275 this->nodeB->drawTree(depth - 1, drawMode); 276 if( this->nodeC != NULL) 277 this->nodeC->drawTree(depth - 1, drawMode); 278 if( this->nodeD != NULL) 279 this->nodeD->drawTree(depth - 1, drawMode); 271 280 } 272 281 -
orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.cc
r4887 r4889 112 112 113 113 114 void SpatialSeparation::drawQuadtree() 115 { 116 if( unlikely( this->quadtree == NULL)) 117 return; 118 119 this->quadtree->drawTree(4, 0); 120 } 114 121 115 122 … … 124 131 125 132 126 -
orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.h
r4845 r4889 34 34 35 35 36 void drawQuadtree(); 37 36 38 private: 37 39 void separateZone(); -
orxonox/trunk/src/world_entities/terrain.cc
r4855 r4889 39 39 this->loadParams(root); 40 40 41 SpatialSeparation*ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f);42 delete ssp;41 this->ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f); 42 // // delete ssp; 43 43 } 44 44 … … 83 83 if (objectList) 84 84 glDeleteLists(this->objectList, 1); 85 if( this->ssp) 86 delete ssp; 85 87 } 86 88 -
orxonox/trunk/src/world_entities/terrain.h
r4836 r4889 15 15 // FORWARD DEFINITION \\ 16 16 class TiXmlElement; 17 class SpatialSeparation; 17 18 18 19 //! A simple method to call a desired debug world. … … 38 39 private: 39 40 int objectList; 41 SpatialSeparation* ssp; 40 42 }; 41 43
Note: See TracChangeset
for help on using the changeset viewer.