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

Method addShape

physx/source/simulationcontroller/src/ScSqBoundsManager.cpp:46–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void SqBoundsManager::addShape(ShapeSim& shape)
47{
48 PX_ASSERT(shape.getFlags() & PxShapeFlag::eSCENE_QUERY_SHAPE);
49 PX_ASSERT(!shape.getBodySim()->usingSqKinematicTarget());
50 PX_ASSERT(!shape.getBodySim()->isFrozen());
51
52 const PxU32 id = mShapes.size();
53 PX_ASSERT(id == mRefs.size());
54 PX_ASSERT(id == mBoundsIndices.size());
55
56 shape.setSqBoundsId(id);
57
58 mShapes.pushBack(&shape);
59 mRefs.pushBack(PX_INVALID_U32); // PT: TODO: should be INVALID_PRUNERHANDLE but cannot include SqPruner.h
60 mBoundsIndices.pushBack(shape.getElementID());
61 mRefless.pushBack(&shape);
62}
63
64void SqBoundsManager::removeShape(ShapeSim& shape)
65{

Callers

nothing calls this directly

Calls 6

getBodySimMethod · 0.80
isFrozenMethod · 0.80
getElementIDMethod · 0.80
getFlagsMethod · 0.45
sizeMethod · 0.45
pushBackMethod · 0.45

Tested by

no test coverage detected