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