| 82 | //~PX_SERIALIZATION |
| 83 | |
| 84 | void NpShapeManager::attachShape(NpShape& shape, PxRigidActor& actor) |
| 85 | { |
| 86 | PX_ASSERT(!mPruningStructure); |
| 87 | |
| 88 | PtrTableStorageManager& sm = NpFactory::getInstance().getPtrTableStorageManager(); |
| 89 | |
| 90 | const PxU32 index = getNbShapes(); |
| 91 | mShapes.add(&shape, sm); |
| 92 | mSceneQueryData.add(reinterpret_cast<void*>(size_t(SQ_INVALID_PRUNER_DATA)), sm); |
| 93 | |
| 94 | NpScene* scene = NpActor::getAPIScene(actor); |
| 95 | if(scene && isSceneQuery(shape)) |
| 96 | setupSceneQuery(scene->getSceneQueryManagerFast(), actor, index); |
| 97 | |
| 98 | Scb::RigidObject& ro = static_cast<Scb::RigidObject&>(NpActor::getScbFromPxActor(actor)); |
| 99 | ro.onShapeAttach(shape.getScbShape()); |
| 100 | |
| 101 | PX_ASSERT(!shape.isExclusive() || shape.getActor()==NULL); |
| 102 | shape.onActorAttach(actor); |
| 103 | } |
| 104 | |
| 105 | bool NpShapeManager::detachShape(NpShape& s, PxRigidActor& actor, bool wakeOnLostTouch) |
| 106 | { |
no test coverage detected