| 118 | } |
| 119 | |
| 120 | void NpConstraint::release() |
| 121 | { |
| 122 | NpScene* npScene = getNpScene(); |
| 123 | NP_WRITE_CHECK(npScene); |
| 124 | |
| 125 | NpPhysics::getInstance().notifyDeletionListenersUserRelease(this, NULL); |
| 126 | |
| 127 | if(mActor0) |
| 128 | NpActor::getFromPxActor(*mActor0).removeConnector(*mActor0, NpConnectorType::eConstraint, this, "PxConstraint: Add to rigid actor 0: Constraint already added"); |
| 129 | if(mActor1) |
| 130 | NpActor::getFromPxActor(*mActor1).removeConnector(*mActor1, NpConnectorType::eConstraint, this, "PxConstraint: Add to rigid actor 1: Constraint already added"); |
| 131 | |
| 132 | if (npScene) |
| 133 | { |
| 134 | npScene->removeFromConstraintList(*this); |
| 135 | npScene->getScene().removeConstraint(getScbConstraint()); |
| 136 | } |
| 137 | |
| 138 | mConstraint.destroy(); |
| 139 | } |
| 140 | |
| 141 | // PX_SERIALIZATION |
| 142 | void NpConstraint::resolveReferences(PxDeserializationContext& context) |
nothing calls this directly
no test coverage detected