0

I have a lot of convex and concave predefined polygons. The example is:

enter image description here

As the SFML documentation says:

...SFML is unable to draw concave shapes. If you need to draw a concave shape, you'll have to split it into multiple convex polygons...

So, the 'concave' is crucial here. Splitting algorithm can be hard to write (and also time-expensive to use), thousands of shapes - one in another. Any idea (or good practices) how to approach solving the problem?

Artur
  • 217
  • 1
  • 5
  • 12
  • Image looks like a demonically possessed Road Runner. – user4581301 Nov 08 '22 at 23:05
  • 1
    just totally random MS paint-made ;) – Artur Nov 08 '22 at 23:23
  • Addition to my "this is a duplicate"-comment: You can relatively easy try to triangulate the shape and then either draw the triangles individually or join them together into convex shapes. I know, the linked question is not for C++ or SFML, but the solutions aren't for actionscript either but more general. – Max Play Nov 09 '22 at 18:43

0 Answers0