14 Commits

Author SHA1 Message Date
72df366761 Points hold multiple Triangles; fix recursive intersection
Also comments and other minor fixes.
2021-01-16 22:21:08 +01:00
21c0e9c609 Add KDTree::get_lines for visualizing the tree 2021-01-12 18:44:53 +01:00
bf96bbf26f Some bugfixes and intersection test in Main
It seems to work, at least to some extent!
2020-12-28 17:39:58 +01:00
a1bae6dd5b Implement ray-triangle-intersection; separate Vector and Point for this 2020-12-28 17:08:56 +01:00
97f8265014 Move geometry structs to own file
Also, the Ray got an unimplemented `intersects_triangle` method, so the kdtree intersection function should be complete.
2020-12-28 16:34:51 +01:00
44f0699ab6 Restructure intersect_ray_recurse
The implementation should be finished aside from the actual ray-triangle-intersection.
2020-12-28 16:28:19 +01:00
71841766f1 Rough cout implementation of ray intersection order
The order in which nodes are checked seems to be correct
2020-12-28 16:00:29 +01:00
c72dde9b84 Add empty implementation for ray intersection 2020-12-28 14:08:43 +01:00
2105e2619e Change std::max_element to min_element
We were using max_element twice
2020-12-28 13:55:38 +01:00
2ce6b06e54 Fix inserted point not being removed from list 2020-12-28 13:51:14 +01:00
80d6a27eef Add to_string to KDTree for debug printing 2020-12-28 12:34:05 +01:00
ece164a660 Fix clang-format
That earlier change introduced an error because YAML sucks
2020-12-28 12:23:23 +01:00
e7f18acc7d Move point comparator lambda to function
This avoids some code duplication
2020-12-28 12:17:44 +01:00
0d8d6d7f6b Add basic untested kdtree implementation 2020-12-28 12:11:25 +01:00