Objects in debug mode now are rendered based on their vao located in the world object.
(Meaning they will update positions / be added when you change / add objects to the world).
Cleaned up code, moved model related types from types.h to models.h.
Ie triangle / face.
Added a tringualtedmodel to contain assembled triangles as to not carry around useless data
Added multi-hit intersection.
A ray will now return all objects which it intersects with. It's slower then optimal but based on the console output
it appears to be still much faster than without a BVH. More testing is required.
Fixed is a strong word. TODO: I have solved the problem by using isEmpty to tell when it's a fresh AABB
and just returing the passed AABB as the new expanded AABB. This feels lazy and I expect it'll cause issues in the future.
Plus it isn't truely correct and the context which uses it could just use the first obj AABB since there is only 1 object
Working on fixing issues with the BVH implementation.
Commiting a working changes version. Code has been cleaned up considerably.
A proper code review is nessacary in the near future.
Currently it appears that the view matrix is rotating the world
and look at pos view matrix is producing incorrect results. appears as if the height is inverted.