First cut at a replica of the python raycaster. Left side almost works the same but have to sort out math differences.

This commit is contained in:
Zed A. Shaw 2025-01-04 12:20:41 -05:00
parent 6b181382bd
commit ca80736d7c
21 changed files with 2165 additions and 90 deletions

19
point.hpp Normal file
View file

@ -0,0 +1,19 @@
#pragma once
#include <vector>
struct Point {
size_t x = 0;
size_t y = 0;
bool operator==(const Point& other) const {
return other.x == x && other.y == y;
}
};
typedef std::vector<Point> PointList;
struct PointHash {
size_t operator()(const Point& p) const {
return std::hash<int>()(p.x) ^ std::hash<int>()(p.y);
}
};