| 484 | } |
| 485 | |
| 486 | void dxQuadTreeSpace::remove(dxGeom* g){ |
| 487 | CHECK_NOT_LOCKED(this); |
| 488 | dAASSERT(g); |
| 489 | dUASSERT(g->parent_space == this,"object is not in this space"); |
| 490 | |
| 491 | // remove |
| 492 | ((Block*)g->tome)->DelObject(g); |
| 493 | count--; |
| 494 | |
| 495 | for (int i = 0; i < DirtyList.size(); i++){ |
| 496 | if (DirtyList[i] == g){ |
| 497 | DirtyList.remove(i); |
| 498 | break; |
| 499 | } |
| 500 | } |
| 501 | |
| 502 | // safeguard |
| 503 | g->next = 0; |
| 504 | g->tome = 0; |
| 505 | g->parent_space = 0; |
| 506 | |
| 507 | // enumerator has been invalidated |
| 508 | current_geom = 0; |
| 509 | |
| 510 | // the bounding box of this space (and that of all the parents) may have |
| 511 | // changed as a consequence of the removal. |
| 512 | dGeomMoved(this); |
| 513 | } |
| 514 | |
| 515 | void dxQuadTreeSpace::dirty(dxGeom* g){ |
| 516 | DirtyList.push(g); |
nothing calls this directly
no test coverage detected