MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / getTriangle

Function getTriangle

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

Source from the content-addressed store, hash-verified

480}
481
482static void getTriangle(const Gu::TriangleMesh&, PxU32 i, PxVec3* wp, const PxVec3* vertices, const void* indices, bool has16BitIndices)
483{
484 PxU32 ref0, ref1, ref2;
485
486 if(!has16BitIndices)
487 {
488 const PxU32* dtriangles = reinterpret_cast<const PxU32*>(indices);
489 ref0 = dtriangles[i*3+0];
490 ref1 = dtriangles[i*3+1];
491 ref2 = dtriangles[i*3+2];
492 }
493 else
494 {
495 const PxU16* wtriangles = reinterpret_cast<const PxU16*>(indices);
496 ref0 = wtriangles[i*3+0];
497 ref1 = wtriangles[i*3+1];
498 ref2 = wtriangles[i*3+2];
499 }
500
501 wp[0] = vertices[ref0];
502 wp[1] = vertices[ref1];
503 wp[2] = vertices[ref2];
504}
505
506static void getTriangle(const Gu::TriangleMesh& mesh, PxU32 i, PxVec3* wp, const PxVec3* vertices, const void* indices, const Matrix34& absPose, bool has16BitIndices)
507{

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