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

Method removeFromRigidActorList

physx/source/physx/src/NpScene.cpp:705–738  ·  view source on GitHub ↗

PT: TODO: inline this one in the header for consistency

Source from the content-addressed store, hash-verified

703
704// PT: TODO: inline this one in the header for consistency
705void NpScene::removeFromRigidActorList(const PxU32& index)
706{
707 PX_ASSERT(index != 0xFFFFFFFF);
708 PX_ASSERT(index < mRigidActors.size());
709
710 {
711 const PxU32 size = mRigidActors.size() - 1;
712 mRigidActors.replaceWithLast(index);
713 if(size && size != index)
714 {
715 PxRigidActor& rigidActor = *mRigidActors[index];
716 switch(rigidActor.getType())
717 {
718 case PxActorType::eRIGID_STATIC:
719 {
720 NpRigidStatic& npStatic = static_cast<NpRigidStatic&>(rigidActor);
721 npStatic.setRigidActorArrayIndex(index);
722 }
723 break;
724 case PxActorType::eRIGID_DYNAMIC:
725 {
726 NpRigidDynamic& npDynamic = static_cast<NpRigidDynamic&>(rigidActor);
727 npDynamic.setRigidActorArrayIndex(index);
728 }
729 break;
730 case PxActorType::eARTICULATION_LINK:
731 case PxActorType::eACTOR_COUNT:
732 case PxActorType::eACTOR_FORCE_DWORD:
733 PX_ASSERT(0);
734 break;
735 }
736 }
737 }
738}
739
740///////////////////////////////////////////////////////////////////////////////
741

Callers 2

removeActorTFunction · 0.80
releaseActorTFunction · 0.80

Calls 4

sizeMethod · 0.45
replaceWithLastMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected