https://github.com/alexandervanrenen/fast-line-of-sight-test
A fast line of sight test for 2d games
https://github.com/alexandervanrenen/fast-line-of-sight-test
game-development geometry
Last synced: 3 months ago
JSON representation
A fast line of sight test for 2d games
- Host: GitHub
- URL: https://github.com/alexandervanrenen/fast-line-of-sight-test
- Owner: alexandervanrenen
- Created: 2019-02-16T10:57:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-17T10:08:09.000Z (over 6 years ago)
- Last Synced: 2025-02-05T17:55:31.151Z (4 months ago)
- Topics: game-development, geometry
- Language: C++
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Line of Sight Test for 2D Games
Code for my [blog post][1] on how to optimize line of sight tests.
There are two little benchmarks:
### Line Segment Intersection Benchmark
This one compares different techniques for line segment intersection.
```
g++ line_intersection.cpp util/*.cpp -std=c++14 -g0 -O3 -I./ -o line_intersection -flto -march=native
./line_intersection
```### Line of Sight Test
This one compares different techniques for line of sight tests.
```
g++ line_of_sight.cpp util/*.cpp -std=c++14 -g0 -O3 -I./ -o line_of_sight -flto -march=native
./line_of_sight
```[1]:http://anizmow.com/blog/line-of-sight-test/