Getting "tnear" and "tfar" of a UserGeometry BoundingBox?

Getting "tnear" and "tfar" of a UserGeometry BoundingBox?


Is is possible to get the points (or the parametric variables) where the ray crosses the user geometry BoundingBox while inside the intersection function? Right now the public API only provides the "UserObject" ptr, the ray and the "geom_id".


For now I'm storing the BoundingBox inside my "struct UserObject { ... };" (as in the API Docs) along with my geometry, then, to test for intersection, I do an AABB intersection test to find the hitpoints of the bounding box before processing my geometry. I believe Embree already computes these hitpoints when doing its BVH traversal, so I was wondering if I can reuse these values already computed by Embree.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

No there is no way of getting these tnear/tfar values. They might not even get calculated by Embree, e.g. if the BVH builder puts two user geometries into one leaf node.

Leave a Comment

Please sign in to add a comment. Not a member? Join today