MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / attachShape

Method attachShape

deps/physx/physx/source/physx/src/NpShapeManager.cpp:106–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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