| 433 | namespace physx |
| 434 | { |
| 435 | PxQuat 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 | |
| 455 | static void D6JointProject(const void* constantBlock, PxTransform& bodyAToWorld, PxTransform& bodyBToWorld, bool projectToA) |
no test coverage detected