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