Changeset 5233 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Sep 24, 2005, 1:17:18 AM (19 years ago)
- Location:
- trunk/src/lib/graphics/spatial_separation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/spatial_separation/quadtree.cc
r5219 r5233 82 82 { 83 83 // delete what has to be deleted here 84 delete [] this->nodes;85 84 if (this->materials != NULL) 86 85 { … … 90 89 } 91 90 91 delete this->offset; 92 92 93 delete this->rootNode; 93 delete offset;94 //delete [] this->nodes; 94 95 } 95 96 -
trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r5232 r5233 128 128 QuadtreeNode::~QuadtreeNode () 129 129 { 130 if( this->nodeA != NULL)130 if( this->nodeA) 131 131 delete this->nodeA; 132 if( this->nodeB != NULL)132 if( this->nodeB) 133 133 delete this->nodeB; 134 if( this->nodeC != NULL)134 if( this->nodeC) 135 135 delete this->nodeC; 136 if( this->nodeD != NULL)136 if( this->nodeD) 137 137 delete this->nodeD; 138 139 if( this->nodes) 140 delete [] this->nodes; 138 141 139 142 if( this->pTriangles) … … 247 250 lenD = listD->getSize(); 248 251 249 pTriA = new sTriangleExt*[l istA->getSize()];250 pTriB = new sTriangleExt*[l istB->getSize()];251 pTriC = new sTriangleExt*[l istC->getSize()];252 pTriD = new sTriangleExt*[l istD->getSize()];252 pTriA = new sTriangleExt*[lenA]; 253 pTriB = new sTriangleExt*[lenB]; 254 pTriC = new sTriangleExt*[lenC]; 255 pTriD = new sTriangleExt*[lenD]; 253 256 254 257 counter = 0; … … 315 318 v.z = this->pDimension->getCenter().z + this->pDimension->getAxis() / 2.0f; 316 319 rA = new Rectangle(v, this->pDimension->getAxis() / 2.0f); 320 317 321 v.z = this->pDimension->getCenter().z - this->pDimension->getAxis() / 2.0f; 318 322 rB = new Rectangle(v, this->pDimension->getAxis() / 2.0f); 323 319 324 v.x = this->pDimension->getCenter().x - this->pDimension->getAxis() / 2.0f; 320 325 rC = new Rectangle(v, this->pDimension->getAxis() / 2.0f); 326 321 327 v.z = this->pDimension->getCenter().z + this->pDimension->getAxis() / 2.0f; 322 328 rD = new Rectangle(v, this->pDimension->getAxis() / 2.0f); 329 323 330 324 331 /* now create the new nodes */
Note: See TracChangeset
for help on using the changeset viewer.