MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / attachShape

Method attachShape

physx/source/physx/src/NpShapeManager.cpp:84–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82//~PX_SERIALIZATION
83
84void 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
105bool NpShapeManager::detachShape(NpShape& s, PxRigidActor& actor, bool wakeOnLostTouch)
106{

Callers 15

createStackFunction · 0.45
createStackFunction · 0.45
createCollectionsFunction · 0.45
createStackFunction · 0.45
createLargeSphereFunction · 0.45
createStackFunction · 0.45
createStackFunction · 0.45
createStackFunction · 0.45
createStackFunction · 0.45
createStackFunction · 0.45
initPhysicsFunction · 0.45
createStackFunction · 0.45

Calls 7

getNbShapesFunction · 0.85
isSceneQueryFunction · 0.85
onShapeAttachMethod · 0.80
isExclusiveMethod · 0.80
onActorAttachMethod · 0.80
addMethod · 0.45
getActorMethod · 0.45

Tested by

no test coverage detected