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

Method addShapes

physx/source/simulationcontroller/src/ScScene.cpp:4785–4804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4783}
4784
4785void Sc::Scene::addShapes(void *const* shapes, PxU32 nbShapes, size_t ptrOffset, RigidSim& bodySim, PxBounds3* outBounds)
4786{
4787 for(PxU32 i=0;i<nbShapes;i++)
4788 {
4789 ShapeCore& sc = *reinterpret_cast<ShapeCore*>(reinterpret_cast<size_t>(shapes[i])+ptrOffset);
4790
4791 //PxBounds3* target = uninflatedBounds ? uninflatedBounds + i : uninflatedBounds;
4792 //mShapeSimPool->construct(sim, sc, llBody, target);
4793
4794 ShapeSim* shapeSim = mShapeSimPool->construct(bodySim, sc);
4795 mNbGeometries[sc.getGeometryType()]++;
4796
4797 mSimulationController->addShape(&shapeSim->getLLShapeSim(), shapeSim->getID());
4798
4799 if (outBounds)
4800 outBounds[i] = mBoundsArray->getBounds(shapeSim->getElementID());
4801
4802 mLLContext->getNphaseImplementationContext()->registerShape(sc.getCore());
4803 }
4804}
4805
4806void Sc::Scene::removeShapes(Sc::RigidSim& sim, Ps::InlineArray<Sc::ShapeSim*, 64>& shapesBuffer , Ps::InlineArray<const Sc::ShapeCore*,64>& removedShapes, bool wakeOnLostTouch)
4807{

Callers

nothing calls this directly

Calls 10

getElementIDMethod · 0.80
registerShapeMethod · 0.80
allocateAndPrefetchMethod · 0.80
prefetchFunction · 0.50
constructMethod · 0.45
getGeometryTypeMethod · 0.45
addShapeMethod · 0.45
getBoundsMethod · 0.45
getCoreMethod · 0.45

Tested by

no test coverage detected