////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// * 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 */ ///////////////////////////////////////////////
| 555 | */ |
| 556 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 557 | inline_ 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 | /** |