Replies: 1 comment 1 reply
-
It's always interesting to be a new-comer to a project and just mess around with a subset of the existing codebase without understanding the full complexity and thought process that went into creating the API in the first place. Thanks for painting the bigger picture here! To provide more context why I need this. I'm working on a mesh sculpting app for Rhino: 214147851-04087ad2-517c-484c-b9d4-15d1ea40e26c.mp4There is a lot to it, but specific to DHART, on mouse move I cast a single ray from the cursor position to identify which mesh vertices fall within the cursor radius. This is the current logic:
Switching to I'd still appreciate a way of updating only portions of the BVH. Currently, I recreate the whole thing on every mouse up. For smaller meshes the penalty is tolerable (5-10 ms) but it gets more noticeable with higher poly counts (240 ms for 1.000.000 triangles). |
Beta Was this translation helpful? Give feedback.
-
Based on the ideas proposed in ed722e0 , there is some value to providing a primitive id of a point. The problems with doing this through the current APIs hit struct:
So while not insurmountable, I think there is a solution to what the aim was of ed722e0 , and provides a nice additional feature that should be relatively clean.
Using a new
RTCPointQuery
(see: https://spec.oneapi.io/oneart/latest/embree-spec.html#rtcpointquery ), we can add a function that allows users to pass a point ( or list of points ), including a radius, and get the primID associated with that point. I took a few minutes to look at the docs. So far from what I can tell, there are a few benefits and features of this method:Some more investigation to the examples are needed though. It's not immediately clear where the callback function should be implemented.
Beta Was this translation helpful? Give feedback.
All reactions