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

Function getTriangle

physx/source/physx/src/NpShapeManager.cpp:460–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460static 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
484static void getTriangle(const Gu::TriangleMesh& mesh, PxU32 i, PxVec3* wp, const PxVec3* vertices, const void* indices, const Matrix34& absPose, bool has16BitIndices)
485{

Callers 7

onShapeHitMethod · 0.85
visualizeActiveEdgesFunction · 0.85
visualizeFaceNormalsFunction · 0.85
visualizeTriangleMeshFunction · 0.85
visualizeHeightFieldFunction · 0.85
outputMeshToStreamFunction · 0.85

Calls 1

transformMethod · 0.45

Tested by

no test coverage detected