MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / release

Method release

deps/physx/physx/source/physx/src/NpConstraint.cpp:120–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void 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
142void NpConstraint::resolveReferences(PxDeserializationContext& context)

Callers

nothing calls this directly

Calls 7

getNpSceneFunction · 0.85
removeConnectorMethod · 0.80
removeConstraintMethod · 0.80
getSceneMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected