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

Function angularProject

physx/source/physxextensions/src/ExtD6Joint.cpp:435–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433namespace physx
434{
435PxQuat angularProject(PxU32 lockedDofs, const PxQuat& q, PxReal cosHalfTol, bool& truncated)
436{
437 PX_ASSERT(lockedDofs <= 7);
438 truncated = false;
439
440 switch(lockedDofs)
441 {
442 case 0: return q;
443 case 1: return q; // currently unimplemented
444 case 2: return q; // currently unimplemented
445 case 3: return project(q, PxVec3(0.0f, 0.0f, 1.0f), cosHalfTol, truncated);
446 case 4: return q; // currently unimplemented
447 case 5: return project(q, PxVec3(0.0f, 1.0f, 0.0f), cosHalfTol, truncated);
448 case 6: return project(q, PxVec3(1.0f, 0.0f, 0.0f), cosHalfTol, truncated);
449 case 7: return truncate(q, cosHalfTol, truncated);
450 default: return PxQuat(PxIdentity);
451 }
452}
453}
454
455static void D6JointProject(const void* constantBlock, PxTransform& bodyAToWorld, PxTransform& bodyBToWorld, bool projectToA)

Callers 1

D6JointProjectFunction · 0.85

Calls 4

projectFunction · 0.85
truncateFunction · 0.85
PxVec3Class · 0.50
PxQuatClass · 0.50

Tested by

no test coverage detected