| 821 | } |
| 822 | |
| 823 | static void NpDestroyConstraint(Scb::Constraint& scb) |
| 824 | { |
| 825 | const size_t offset = size_t(&(reinterpret_cast<NpConstraint*>(0)->getScbConstraint())); |
| 826 | NpConstraint* np = reinterpret_cast<NpConstraint*>(reinterpret_cast<char*>(&scb)-offset); |
| 827 | if(np->getBaseFlags() & PxBaseFlag::eOWNS_MEMORY) |
| 828 | NpFactory::getInstance().releaseConstraintToPool(*np); |
| 829 | else |
| 830 | np->~NpConstraint(); |
| 831 | NpPhysics::getInstance().notifyDeletionListenersMemRelease(np, NULL); |
| 832 | } |
| 833 | |
| 834 | namespace physx |
| 835 | { |
no test coverage detected