hump icon indicating copy to clipboard operation
hump copied to clipboard

polygon function to draw visible area

Open Felecarpp opened this issue 2 years ago • 2 comments

A visibility function to get the polygon of visible area from a list of segments (walls). There are three new functions in vector.lua used by visibility function: intersection, alignment and polar_lt I put a demonstration script, unit test script and performance timer script.

Felecarpp avatar Jul 22 '22 11:07 Felecarpp

I very much appreciate the additon of unit tests. However, what isn't clear to me from this is what visibles.polygon is actually for. The demo does not make it much clearer I'm afraid. Cna you explain it further?

Ah I feel silly, it is for calculating line of sight. This seems like something handy, but I'm not sure it belongs in hump rather than in a standalone library. Either way I'll give it another review so you can use the feedback whether we merge or you make your own library.

HDictus avatar Nov 04 '22 16:11 HDictus

Thanks for these reviews. I will see to them but not for several months.

Felecarpp avatar Nov 04 '22 19:11 Felecarpp