Closed Veykril closed 4 years ago
Yeah I think this is an oversight of something that was originally meant to get checked... I'm actually thinking I'm going to rip out the geometry module from ultraviolet
proper for the next release and have it as its own addon crate, i.e. ultraviolet_geometry
or something as it's a little bit of an afterthought at the moment.
oh also cc @jaynus
Seperating the geometry part from this crate seems like a good call in general since not everyone needs it either I imagine.
Indeed! Closing this here; thanks for the report :)
The family of functions
intersect_ray/line/plane
onPlane
/Ray
all return an Option that is actually alwaysSome
while the comment(that is not present onRay::intersect_plane
) states that the callee has to check prior to calling the given function whether the ray actually intersects the plane or not. The return type in general made me at first assume that the operation is actually checking whether the intersection occured or not. Was theOption
forgotten to be removed or was it planned to actually be a checked operation at some point?The code in question: https://github.com/termhn/ultraviolet/blob/0dfc114deda9e8ed94c964de027bd74a206cd672/src/geometry.rs#L177-L182