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

Method addConstraintsToSceneInternal

physx/source/physx/src/NpActor.cpp:349–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349void NpActor::addConstraintsToSceneInternal()
350{
351 if(!mConnectorArray)
352 return;
353
354 NpConnectorIterator iter = getConnectorIterator(NpConnectorType::eConstraint);
355 while (PxBase* ser = iter.getNext())
356 {
357 NpConstraint* c = static_cast<NpConstraint*>(ser);
358 PX_ASSERT(c->getNpScene() == NULL);
359
360 c->markDirty(); // PT: "temp" fix for crash when removing/re-adding jointed actor from/to a scene
361
362 NpScene* s = c->getSceneFromActors();
363 if (s)
364 {
365 s->addToConstraintList(*c);
366 s->getScene().addConstraint(c->getScbConstraint());
367 }
368 }
369}
370
371
372

Callers

nothing calls this directly

Calls 7

getNpSceneMethod · 0.80
getSceneFromActorsMethod · 0.80
addToConstraintListMethod · 0.80
getNextMethod · 0.45
markDirtyMethod · 0.45
addConstraintMethod · 0.45
getSceneMethod · 0.45

Tested by

no test coverage detected