| 252 | } |
| 253 | |
| 254 | void Block::DelObject(dGeomID Object){ |
| 255 | // Del the geom |
| 256 | dxGeom* g = First; |
| 257 | dxGeom* Last = 0; |
| 258 | while (g){ |
| 259 | if (g == Object){ |
| 260 | if (Last){ |
| 261 | Last->next = g->next; |
| 262 | } |
| 263 | else First = g->next; |
| 264 | |
| 265 | break; |
| 266 | } |
| 267 | Last = g; |
| 268 | g = g->next; |
| 269 | } |
| 270 | |
| 271 | Object->tome = 0; |
| 272 | |
| 273 | // Now traverse upwards to tell that we have lost a geom |
| 274 | Block* Block = this; |
| 275 | do{ |
| 276 | Block->GeomCount--; |
| 277 | Block = Block->Parent; |
| 278 | } |
| 279 | while (Block); |
| 280 | } |
| 281 | |
| 282 | void Block::Traverse(dGeomID Object){ |
| 283 | Block* NewBlock = GetBlock(Object->aabb); |