| 458 | } |
| 459 | |
| 460 | static void getTriangle(const Gu::TriangleMesh&, PxU32 i, PxVec3* wp, const PxVec3* vertices, const void* indices, bool has16BitIndices) |
| 461 | { |
| 462 | PxU32 ref0, ref1, ref2; |
| 463 | |
| 464 | if(!has16BitIndices) |
| 465 | { |
| 466 | const PxU32* dtriangles = reinterpret_cast<const PxU32*>(indices); |
| 467 | ref0 = dtriangles[i*3+0]; |
| 468 | ref1 = dtriangles[i*3+1]; |
| 469 | ref2 = dtriangles[i*3+2]; |
| 470 | } |
| 471 | else |
| 472 | { |
| 473 | const PxU16* wtriangles = reinterpret_cast<const PxU16*>(indices); |
| 474 | ref0 = wtriangles[i*3+0]; |
| 475 | ref1 = wtriangles[i*3+1]; |
| 476 | ref2 = wtriangles[i*3+2]; |
| 477 | } |
| 478 | |
| 479 | wp[0] = vertices[ref0]; |
| 480 | wp[1] = vertices[ref1]; |
| 481 | wp[2] = vertices[ref2]; |
| 482 | } |
| 483 | |
| 484 | static void getTriangle(const Gu::TriangleMesh& mesh, PxU32 i, PxVec3* wp, const PxVec3* vertices, const void* indices, const Matrix34& absPose, bool has16BitIndices) |
| 485 | { |
no test coverage detected