Replies: 1 comment 3 replies
-
The number of contact candidates that a single edge can contribute is 2 because the clipped features are guaranteed to be convex. Given perfect numerical precision, getting more than 2 would require concavity- tracing the opposing face's edges would need to go outside the edge, then inside the edge, then outside again. So, the number of edge-related candidates generated is no larger than There can also be candidates when an edge is fully contained within the opposing face. We only generate one per contained edge in this case- there's no point in creating a contact for the start and the end of the edge, because the end of the edge is the start of the next edge. So the number of possible contained edge contacts is So, the maximum number of candidates from either source is just In practice, numerical error could result in spurious contacts being added, but this tends to be pretty rare and the implementation just shrugs and stops adding contacts once the candidate set is full.
For a full face-face test, you'd have to choose some candidates to not generate ahead of time. There may exist some rules that would get you results similar to the contact reduction postpass, but it would probably be complicated. |
Beta Was this translation helpful? Give feedback.
-
Your code amazes me, I would like to ask something about box-box in narrowphase.
Why the number of candidates can be implicitly guaranteed to be 8 or less?
When clipping edges to faces, is it possible to ensure that the number of generated candidates is less than or equal to 4?
Beta Was this translation helpful? Give feedback.
All reactions