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

Method resolveReferences

physx/source/physx/src/NpAggregate.cpp:378–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378void NpAggregate::resolveReferences(PxDeserializationContext& context)
379{
380 // Resolve actor pointers if needed
381 for(PxU32 i=0; i < mNbActors; i++)
382 {
383 context.translatePxBase(mActors[i]);
384 {
385 //update aggregate if mActors is in external reference
386 NpActor& np = NpActor::getFromPxActor(*mActors[i]);
387 if(np.getAggregate() == NULL)
388 {
389 np.setAggregate(this, *mActors[i]);
390 }
391 if(mActors[i]->getType() == PxActorType::eARTICULATION_LINK)
392 {
393 PxArticulationBase& articulation = static_cast<NpArticulationLink*>(mActors[i])->getRoot();
394 if(!articulation.getAggregate())
395 reinterpret_cast<PxArticulationImpl*>(articulation.getImpl())->setAggregate(this);
396 }
397 }
398 }
399}
400
401NpAggregate* NpAggregate::createObject(PxU8*& address, PxDeserializationContext& context)
402{

Callers 1

createObjectMethod · 0.45

Calls 6

translatePxBaseMethod · 0.80
getAggregateMethod · 0.45
setAggregateMethod · 0.45
getTypeMethod · 0.45
getRootMethod · 0.45
getImplMethod · 0.45

Tested by

no test coverage detected