Hi, I am reading Game Coding Complete, 3rd Edition now and I just came across an interesting code on page 262 about hit testing for 2D polygons. I am just curious about how the algorithm really works.
It was written that the code was adapted from Graphic Gems, but the name of the original author wasn't mentioned. I tried looking for it, but what I found seems to be very different from the code in the book, like for example this code by Didier Badouel
tog.acm.org/resources/GraphicsGems/gems/RayPolygon.c
There is also a probability that the code in the book has been changed a lot from its original one.
I'd really appreciate it if someone can explain it to me.
Thanks.
It was written that the code was adapted from Graphic Gems, but the name of the original author wasn't mentioned. I tried looking for it, but what I found seems to be very different from the code in the book, like for example this code by Didier Badouel
tog.acm.org/resources/GraphicsGems/gems/RayPolygon.c
There is also a probability that the code in the book has been changed a lot from its original one.
I'd really appreciate it if someone can explain it to me.
Thanks.