w0rm/elm-physics

Task: benchmark variations on sphere-convex collision detection.

paulmartel opened this issue · 2 comments

There are several possible strategies differing in the order in which elements -- faces, edges, or vertices -- are tested.

Of the 6 possible permutations, "faces then edges then vertices" or "vertices then edges then faces" seem like the most promising alternatives to the current one "vertices then faces then edges".

Each strategy may have its own variants based on how much cached state (e.g. the adjacent faces lists) it uses to minimize its recalculations.

As of PR #34 we've adopted "faces then edges then vertices" for a modest performance gain. At some point, we could still investigate whether "vertices then edges then faces" would fare any better, so I'll leave this open as a low priority issue.

w0rm commented

It seems that faces have to be tested first anyway, otherwise it will cause regression. I think we should stick to the current approach for the time being.