| 104 | //~PX_SERIALIZATION |
| 105 | |
| 106 | void NpShapeManager::attachShape(NpShape& shape, PxRigidActor& actor) |
| 107 | { |
| 108 | PX_ASSERT(!mPruningStructure); |
| 109 | |
| 110 | PtrTableStorageManager& sm = NpFactory::getInstance().getPtrTableStorageManager(); |
| 111 | |
| 112 | const PxU32 index = getNbShapes(); |
| 113 | mShapes.add(&shape, sm); |
| 114 | mSceneQueryData.add(reinterpret_cast<void*>(size_t(SQ_INVALID_PRUNER_DATA)), sm); |
| 115 | |
| 116 | NpScene* scene = NpActor::getAPIScene(actor); |
| 117 | if(scene && isSceneQuery(shape)) |
| 118 | setupSceneQuery(scene->getSceneQueryManagerFast(), actor, index); |
| 119 | |
| 120 | Scb::RigidObject& ro = static_cast<Scb::RigidObject&>(NpActor::getScbFromPxActor(actor)); |
| 121 | ro.onShapeAttach(shape.getScbShape()); |
| 122 | |
| 123 | PX_ASSERT(!shape.isExclusive() || shape.getActor()==NULL); |
| 124 | shape.onActorAttach(actor); |
| 125 | } |
| 126 | |
| 127 | bool NpShapeManager::detachShape(NpShape& s, PxRigidActor& actor, bool wakeOnLostTouch) |
| 128 | { |
no test coverage detected