-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Get the last picked item #9066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Get the last picked item #9066
Conversation
|
"picked_item" sounds strange. Could the value type be a struct with a conversion operator to |
|
Do we want the equivalent functionality for tetrahedral mesh boundaries ? |
what's the problem with the value type? The function is available only for generators that first need to select an item within a range and then sample the point in the picked item. I'm OK with whatever better name you could come up with. |
It is already here. See https://github.com/CGAL/cgal/pull/9066/files#diff-0d2d36f802470003ce212fc13d25eddff587acac6c3864488f104e31aaec8f75R692 |
|
what @afabri meant is to make |
|
In Munich, we agreed to keep it that way. |
|
Successfully tested in CGAL-6.2-Ic-82 |
|
What about the generator returning a pair of face descriptor and point? |
|
not in |
|
If you are worried of multithread usage, you would anyway get a different generator per thread (I don't think they are threadsafe currently) |
You can now do:
Random_points_in_triangle_mesh_3<TriangleMesh> g(mesh, r); Point c = *g; face_descriptor fc = g.last_item_picked();to get the normal of the picked point
cc @huang46u