How to represent a polygon with hole(s)?

前端 未结 6 1839
野趣味
野趣味 2021-01-02 10:17

It\'s usually popular to work with polygons with their vertices sorted CW or CCW in vectors(2*1 or 1*2 matrices). However, how to state polygons with holes in vectors?

6条回答
  •  别那么骄傲
    2021-01-02 10:57

    It sounds like each hole is just a polygon inside the polygon itself. Perhaps you could store a vector like you describe for the outer polygon, then a vector of more polygon vectors for the holes.

提交回复
热议问题