So I've been working on the collision detection portion of my 2D physics engine (just finished implementing GJK with simplex caching), however throughout the process I've been curious about the most efficient and scalable means for transforming my polygon vertices. Currently I transform only the cached support vertices of my simplex into world coordinates at the beginning of GJK (to get an updated copy of the simplex assuming the polygons have moved between frames), and then I transform each newly added support vertex into world coordinates. This equates to roughly 12 or so transformations per candidate collision pairs.

Though this seems more scalable than transforming all vertices of each polygon per frame, doing it all up front would allow me to take advantage of parallelization (whether on the GPU or not).

Any suggestions on when to transform vertices; as needed vs batched in parallel (pre-computation and perhaps again at render).

Thanks!