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

Method release

physx/source/physx/src/NpActor.cpp:173–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void NpActor::release(PxActor& owner)
174{
175 if(mConnectorArray) // Need to test again because the code above might purge the connector array if no element remains
176 {
177 PX_ASSERT(mConnectorArray->size() == 1); // At this point only the aggregate should remain
178 PX_ASSERT((*mConnectorArray)[0].mType == NpConnectorType::eAggregate);
179
180 NpAggregate* a = static_cast<NpAggregate*>((*mConnectorArray)[0].mObject);
181 bool status = a->removeActorAndReinsert(owner, false);
182 PX_ASSERT(status);
183 PX_UNUSED(status);
184 PX_ASSERT(!mConnectorArray); // Remove should happen in aggregate code
185 }
186
187 PX_ASSERT(!mConnectorArray); // All the connector objects should have been removed at this point
188}
189
190///////////////////////////////////////////////////////////////////////////////
191

Callers

nothing calls this directly

Calls 3

PX_UNUSEDFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected