MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / remove

Method remove

3rd_party/Src/ode/ode/src/collision_quadtreespace.cpp:486–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484}
485
486void 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
515void dxQuadTreeSpace::dirty(dxGeom* g){
516 DirtyList.push(g);

Callers

nothing calls this directly

Calls 3

dGeomMovedFunction · 0.85
DelObjectMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected