You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thank you for this useful crate :) It works great for my application, except for the following case. When intersecting a ray and a flat AABB, false is returned. For instance,
let origin = Point3::<f64>::new(0.0,0.0,0.0);let direction = Vector3::<f64>::new(0.0,0.0,1.0);let ray = Ray::new(origin, direction);let min = Point3::<f64>::new(-1.0, -1.0,1.0);let max = Point3::<f64>::new(1.0,1.0,1.0);let aabb = Aabb::with_bounds(min, max);assert!(ray.intersects_aabb(&aabb));
The last assertion fails, where I would have expected true (e.g. when bounding an axis-aligned triangular facet).
My apologies if this is the intended behaviour?
I am running on x86_64 Linux with version 0.9.0 (and default features, i.e. simd disabled).
The text was updated successfully, but these errors were encountered:
The issue is not that the BVH is empty, but that faces that are axis-aligned (thus have a flat bounding box) are not considered as being intersected by rays. Changing the strict equality test to "greater or equal" (for example here) solved my issue (basically). Thus something the like:
tmax >= fast_max(tmin, T::zero())
(but also in other places, depending on the architecture)
Hello,
thank you for this useful crate :) It works great for my application, except for the following case. When intersecting a ray and a flat AABB,
false
is returned. For instance,The last assertion fails, where I would have expected
true
(e.g. when bounding an axis-aligned triangular facet).My apologies if this is the intended behaviour?
I am running on x86_64 Linux with version 0.9.0 (and default features, i.e.
simd
disabled).The text was updated successfully, but these errors were encountered: