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

Function visualizeActiveEdges

physx/source/physx/src/NpShapeManager.cpp:494–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492}
493
494static void visualizeActiveEdges(RenderOutput& out, const Gu::TriangleMesh& mesh, PxU32 nbTriangles, const PxU32* results, const Matrix34& absPose)
495{
496 const PxU8* extraTrigData = mesh.getExtraTrigData();
497 PX_ASSERT(extraTrigData);
498
499 const PxVec3* vertices = mesh.getVerticesFast();
500 const void* indices = mesh.getTrianglesFast();
501
502 out << PxU32(PxDebugColor::eARGB_YELLOW); // PT: no need to output this for each segment!
503
504 const bool has16Bit = mesh.has16BitIndices();
505 for(PxU32 i=0; i<nbTriangles; i++)
506 {
507 const PxU32 index = results ? results[i] : i;
508
509 PxVec3 wp[3];
510 getTriangle(mesh, index, wp, vertices, indices, absPose, has16Bit);
511
512 const PxU32 flags = extraTrigData[index];
513
514 if(flags & Gu::ETD_CONVEX_EDGE_01)
515 out.outputSegment(wp[0], wp[1]);
516
517 if(flags & Gu::ETD_CONVEX_EDGE_12)
518 out.outputSegment(wp[1], wp[2]);
519
520 if(flags & Gu::ETD_CONVEX_EDGE_20)
521 out.outputSegment(wp[0], wp[2]);
522 }
523}
524
525static void visualizeFaceNormals( PxReal fscale, RenderOutput& out, const TriangleMesh& mesh, PxU32 nbTriangles, const PxVec3* vertices,
526 const void* indices, bool has16Bit, const PxU32* results, const Matrix34& absPose, const PxMat44& midt)

Callers 1

visualizeTriangleMeshFunction · 0.85

Calls 5

getTriangleFunction · 0.85
getExtraTrigDataMethod · 0.80
getVerticesFastMethod · 0.80
getTrianglesFastMethod · 0.80
has16BitIndicesMethod · 0.45

Tested by

no test coverage detected