MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / PrimTestTriIndex

Method PrimTestTriIndex

Engine/lib/opcode/OPC_TreeCollider.cpp:557–571  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// * Leaf-leaf test for a previously fetched triangle from tree A (in B's space) and a new leaf from B. * \param id1 [in] leaf-triangle index from tree B */ ///////////////////////////////////////////////

Source from the content-addressed store, hash-verified

555 */
556///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
557inline_ void AABBTreeCollider::PrimTestTriIndex(udword id1)
558{
559 // Request vertices from the app
560 VertexPointers VP;
561 mIMesh1->GetTriangle(VP, id1);
562
563 // Perform triangle-triangle overlap test
564 if(TriTriOverlap(mLeafVerts[0], mLeafVerts[1], mLeafVerts[2], *VP.Vertex[0], *VP.Vertex[1], *VP.Vertex[2]))
565 {
566 // Keep track of colliding pairs
567 mPairs.Add(mLeafIndex).Add(id1);
568 // Set contact status
569 mFlags |= OPC_CONTACT;
570 }
571}
572
573///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
574/**

Callers

nothing calls this directly

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected