The cache can be empty, or hold 1, 2, 3 or 4 points. Some collision algorithms (GJK) might only add one point at a time, updates/refreshes old contact points, and throw them away if necessary (distance becomes too large).
Reduces the cache to 4 points, when more then 4 points are added, using following rules: the contact point with deepest penetration is always kept, and it tries to maximize the area covered by the points.
Note that some pairs of objects might have more then one contact manifold. @author jezek2
|
|