Smarter Outlines: Not only obstacles but also particles ? (if performant)
At the moment, we use Makie.to_line_segments
to draw particle outlines, which simply collects all the vertices of all the meshes in the particle mesh vector and concatenates them, separated by NaN
s. This has the disadvantage of leaving the outlines open, since the connection between the first and last vertex isn't drawn.
Since this function would be easy to rewrite in a way where this problem is taken care of, we should probably do that. ALso, I'd like to add "inside vertices" that are not included in the outline in the future, which could probably be hacked together using vertex metadata (although that would mean that all 2D plotting functions have to be able to handle input with and without unexpected metadata)
Big Update! we now have a function that can automatically detect outside edges (even in meshes with multiple outside loops!) If its not too slow, we could use that.