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

Method updateCompound

physx/source/scenequery/src/SqCompoundPruner.cpp:171–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169///////////////////////////////////////////////////////////////////////////////////////////////
170
171void BVHCompoundPruner::updateCompound(PrunerCompoundId compoundId, const PxTransform& transform)
172{
173 const ActorIdPoolIndexMap::Entry* poolIndexEntry = mActorPoolMap.find(compoundId);
174 PX_ASSERT(poolIndexEntry);
175
176 if(poolIndexEntry)
177 {
178 const PxU32 poolIndex = poolIndexEntry->second;
179 PxBounds3 localBounds;
180 const IncrementalAABBTreeNode* node = mCompoundTreePool.getCompoundTrees()[poolIndex].mTree->getNodes();
181 mCompoundTreePool.getCompoundTrees()[poolIndex].mGlobalPose = transform;
182 V4StoreU(node->mBVMin, &localBounds.minimum.x);
183 PX_ALIGN(16, PxVec4) max4;
184 V4StoreA(node->mBVMax, &max4.x);
185 localBounds.maximum = PxVec3(max4.x, max4.y, max4.z);
186 const PxBounds3 compoundBounds = PxBounds3::transformFast(transform, localBounds);
187 mCompoundTreePool.getCurrentCompoundBounds()[poolIndex] = compoundBounds;
188 mChangedLeaves.clear();
189 IncrementalAABBTreeNode* mainTreeNode = mMainTree.update(mMainTreeUpdateMap[poolIndex], poolIndex, mCompoundTreePool.getCurrentCompoundBounds(), mChangedLeaves);
190 // we removed node during update, need to update the mapping
191 updateMapping(poolIndex, mainTreeNode);
192 }
193
194#if PARANOIA_CHECKS
195 test();
196#endif
197}
198
199///////////////////////////////////////////////////////////////////////////////////////////////
200

Callers 2

updateCompoundActorsMethod · 0.80
updateCompoundActorMethod · 0.80

Calls 10

transformFastFunction · 0.85
getCompoundTreesMethod · 0.80
V4StoreUFunction · 0.50
V4StoreAFunction · 0.50
PxVec3Class · 0.50
findMethod · 0.45
getNodesMethod · 0.45
clearMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected