| 79 | |
| 80 | |
| 81 | void PxCollectionExt::remove(PxCollection& collection, PxType concreteType, PxCollection* to) |
| 82 | { |
| 83 | shdfnd::Array<PxBase*> removeObjects; |
| 84 | |
| 85 | for (PxU32 i = 0; i < collection.getNbObjects(); i++) |
| 86 | { |
| 87 | PxBase& object = collection.getObject(i); |
| 88 | if(concreteType == object.getConcreteType()) |
| 89 | { |
| 90 | if(to) |
| 91 | to->add(object); |
| 92 | |
| 93 | removeObjects.pushBack(&object); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | for (PxU32 i = 0; i < removeObjects.size(); ++i) |
| 98 | collection.remove(*removeObjects[i]); |
| 99 | } |
| 100 | |
| 101 | PxCollection* PxCollectionExt::createCollection(PxPhysics& physics) |
| 102 | { |
no test coverage detected