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

Method addCompound

physx/source/scenequery/src/SqCompoundPruner.cpp:68–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66///////////////////////////////////////////////////////////////////////////////////////////////
67
68bool BVHCompoundPruner::addCompound(PrunerHandle* results, const Gu::BVHStructure& bvhStructure, PrunerCompoundId compoundId, const PxTransform& transform, CompoundFlag::Enum flags, const PrunerPayload* userData)
69{
70 PX_ASSERT(bvhStructure.getNbBounds());
71
72 const PxBounds3 compoundBounds = PxBounds3::transformFast(transform, bvhStructure.getNodes()->mBV);
73 const PoolIndex poolIndex = mCompoundTreePool.addCompound(results, bvhStructure, compoundBounds, transform, flags, userData);
74
75 mChangedLeaves.clear();
76 IncrementalAABBTreeNode* node = mMainTree.insert(poolIndex, mCompoundTreePool.getCurrentCompoundBounds(), mChangedLeaves);
77 updateMapping(poolIndex, node);
78
79 mActorPoolMap[compoundId] = poolIndex;
80 mPoolActorMap[poolIndex] = compoundId;
81
82#if PARANOIA_CHECKS
83 test();
84#endif
85 return true;
86}
87
88///////////////////////////////////////////////////////////////////////////////////////////////
89

Callers 1

addCompoundShapeMethod · 0.45

Calls 6

transformFastFunction · 0.85
getNbBoundsMethod · 0.80
getNodesMethod · 0.45
clearMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected