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

Method createConstraint

physx/source/physx/src/NpFactory.cpp:372–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372PxConstraint* NpFactory::createConstraint(PxRigidActor* actor0, PxRigidActor* actor1, PxConstraintConnector& connector, const PxConstraintShaderTable& shaders, PxU32 dataSize)
373{
374 PX_CHECK_AND_RETURN_NULL((actor0 && !actor0->is<PxRigidStatic>()) || (actor1 && !actor1->is<PxRigidStatic>()), "createConstraint: At least one actor must be dynamic or an articulation link");
375
376 NpConstraint* npConstraint;
377 {
378 Ps::Mutex::ScopedLock lock(mConstraintPoolLock);
379 npConstraint = mConstraintPool.construct(actor0, actor1, connector, shaders, dataSize);
380 }
381 addConstraint(npConstraint);
382 return npConstraint;
383}
384
385void NpFactory::releaseConstraintToPool(NpConstraint& constraint)
386{

Callers 9

PulleyJointMethod · 0.45
attachMethod · 0.45
attachMethod · 0.45
attachMethod · 0.45
attachMethod · 0.45
attachMethod · 0.45
attachMethod · 0.45
attachMethod · 0.45
setupMethod · 0.45

Calls 1

constructMethod · 0.45

Tested by

no test coverage detected