| 142 | /////////////////////////////////////////////////////////////////////////////// |
| 143 | |
| 144 | void NpActor::releaseConstraints(PxRigidActor& owner) |
| 145 | { |
| 146 | if(mConnectorArray) |
| 147 | { |
| 148 | PxU32 nbConnectors = mConnectorArray->size(); |
| 149 | PxU32 currentIndex = 0; |
| 150 | while(nbConnectors--) |
| 151 | { |
| 152 | NpConnector& connector = (*mConnectorArray)[currentIndex]; |
| 153 | if (connector.mType == NpConnectorType::eConstraint) |
| 154 | { |
| 155 | NpConstraint* c = static_cast<NpConstraint*>(connector.mObject); |
| 156 | c->actorDeleted(&owner); |
| 157 | |
| 158 | NpScene* s = c->getNpScene(); |
| 159 | if (s) |
| 160 | { |
| 161 | s->getScene().removeConstraint(c->getScbConstraint()); |
| 162 | s->removeFromConstraintList(*c); |
| 163 | } |
| 164 | |
| 165 | removeConnector(owner, currentIndex); |
| 166 | } |
| 167 | else |
| 168 | currentIndex++; |
| 169 | } |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | void NpActor::release(PxActor& owner) |
| 174 | { |
nothing calls this directly
no test coverage detected