Matthew Gordon
f5b0a35635
Replace nalgebra matrix and vector classes with own classes
...
Nalgebra only used to find matrix inverse now.
2020-08-28 23:08:44 -04:00
Matthew Gordon
99cf127c9f
Change a bunch of generics that used with RealType to just use f64
2020-08-18 23:12:28 -04:00
Matthew Gordon
699c308782
Rewrite BoundingVolumeHierarchy
...
New BVH has much cleaner design and is also using a much better
heuristic for dividing the scene.
Massive speedup (~28x!), presumable from having a heuristic that
actually works. This is still a simple heuristic (sort by
bounding box centres along largest dimension, and then divide into
equal halves) which can definitely be improved.
2020-08-11 23:59:03 -04:00
Matthew Gordon
aa942a2a3c
Make sure normals or imported meshes are unit length.
2020-06-19 00:01:12 -04:00
Matthew Gordon
90bb7d84af
Big rijiggering of types
2020-06-11 22:13:51 -04:00
Matthew Gordon
1d9baf1f05
Add some documentation for mesh module
2020-04-24 00:31:15 -04:00
Matthew Gordon
1b66995bdd
Replace Vec references with slices in a few places.
2020-04-03 23:34:44 -04:00
Matthew Gordon
ad2b9247b8
Use BoundingVolumeHierarchy to accelerate rendering
2020-02-28 23:26:56 -05:00
Matthew Gordon
d6b5c87759
Create Real trait to replace nalgebra::RealField
...
Real inherits RealField, but I want to add more to it.
2020-02-10 16:52:09 -05:00
Matthew Gordon
1653174ef6
Make triangle a submodule of raycasting.
2019-12-21 15:29:52 -05:00
Matthew Gordon
08484306fd
Move load_obj() into submudule
2019-12-21 10:43:39 -05:00
Matthew Gordon
7cdcdb145a
Remove unused function.
2019-12-21 10:08:00 -05:00
Matthew Gordon
e1de889d3a
Quick-and-dirty multithreading
...
Not the best multithreading scheme and needs error handling, but
it works.
2019-12-21 10:07:53 -05:00
Matthew Gordon
3618636c42
First quick pass at loading OBJ files.
2019-12-21 09:11:30 -05:00
Matthew Gordon
199b33f944
Remove unused function
2019-12-12 13:01:02 -05:00
Matthew Gordon
777580be17
Fix triangle intersection passing when triangle is behind ray
2019-12-12 08:57:46 -05:00
Matthew Gordon
9096ff67b6
Remove some debug prints that I committed by accident
2019-12-12 08:56:31 -05:00
Matthew Gordon
c05eba391b
Add more tests for triangle intersection and fix a couple of bugs
...
Still not working properly.
2019-12-12 07:51:26 -05:00
Matthew Gordon
9eca3a4cfe
Replace Vector3 with Point3 where appropriate
2019-12-07 11:09:07 -05:00
Matthew Gordon
2b3d350fbb
Add intersection test for triangle; not quite working yet though
2019-12-07 09:28:11 -05:00