PT: TODO: inline this one in the header for consistency
| 700 | |
| 701 | // PT: TODO: inline this one in the header for consistency |
| 702 | void 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 |
no test coverage detected