-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
It might be useful to write an interface that ensures that rays always have a unit-length direction.
This would eliminate the need to normalize ray direction in places like intersectTri and generally be more correct since a ray's direction doesn't conceptually have a length at all. On the other hand, this would cause every single ray that is cast to get normalized exactly once, as opposed to a possibly zero indefinite number of times like we have now, which might hurt run time a lot.
Potential problem: what should happen if somebody tries to build a ray with a direction of length 0? Throwing an exception is kind of a lame solution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels