Niels Vaes 29c0d81c27 Update on the ZONE_POLYGON class, so we can finally use it with drawings made in the Mission Editor as well.
Supports closed line segments, rects and freely drawn polygons.

Added the correct way of generating a point within a polygon with trial and error

Added a way to get the surface area.

Added a helper class (_ZONE_TRIANGLE), which shouldn't ever be used on its own. It's there to support the update ZONE_POLYGON.

Some test code, assuming there's a poygon drawn in the mission editor called "poly":

```Lua
-- make a new zone from a drawing
poly = ZONE_POLYGON:NewFromDrawing("poly")
-- draw the zone for everyone, include the individual triangles that make up the polygon
poly:DrawZone(-1, {1,0,0}, 1, {1,0,0}, 255, 4, false, true)
-- generate 500 random points, evenly distributed in the polygon
for i=1, 500 do
	COORDINATE:NewFromVec2(poly:GetRandomVec2()):CircleToAll(1000)
end

-- remove the drawing from the game
poly:UndrawZone()
```
2023-12-02 20:33:30 +01:00
..
2023-10-30 18:01:57 +01:00
2023-09-13 16:03:32 +02:00
2022-10-21 13:52:09 +02:00
2023-11-23 17:01:33 +01:00
2023-10-31 19:53:20 +01:00
2023-11-16 22:32:01 +01:00
2023-11-19 12:40:22 +01:00
2023-10-31 13:04:48 +01:00
2021-12-20 12:59:56 +01:00
2023-10-31 10:25:00 +01:00
2023-11-15 18:16:46 +01:00
2023-10-31 10:25:00 +01:00
2023-11-16 22:32:01 +01:00
2021-12-20 12:59:56 +01:00
2023-10-31 10:25:00 +01:00
SET
2023-11-17 15:05:19 +01:00
2023-11-29 18:01:37 +01:00
2022-12-02 16:39:09 +01:00
2023-11-17 15:07:29 +01:00
2022-11-11 09:35:54 +01:00
2023-06-13 21:53:19 +02:00
2022-10-19 12:20:39 +02:00
2022-10-21 13:52:09 +02:00