MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / removeFromRigidActorList

Method removeFromRigidActorList

deps/physx/physx/source/physx/src/NpScene.cpp:702–735  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

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