Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Allan_H_
Beginner
73 Views

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

Jump to solution

 

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.

0 Kudos
1 Solution
SvenW_Intel
Moderator
73 Views

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.

View solution in original post

1 Reply
SvenW_Intel
Moderator
74 Views

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.

View solution in original post

Reply