This is a lightweight algorithm for quickly detecting whether a point is inside a polygon, primarily based on 'bounding box filtering' and the 'ray-casting method'.
mkdir build && cd build
cmake ..
make
./demo
python3 ../src/plot_points.py
Case 1 finished in 0.273792 ms
Case 2 finished in 0.267125 ms