MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / releaseConstraints

Method releaseConstraints

physx/source/physx/src/NpActor.cpp:144–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142///////////////////////////////////////////////////////////////////////////////
143
144void 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
173void NpActor::release(PxActor& owner)
174{

Callers

nothing calls this directly

Calls 6

actorDeletedMethod · 0.80
getNpSceneMethod · 0.80
sizeMethod · 0.45
removeConstraintMethod · 0.45
getSceneMethod · 0.45

Tested by

no test coverage detected