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
If you are counting the number of hits a ray had, this method
should be used as if only the triangle index is used on- edge hits
will be counted twice.
I'm having trouble understanding this, but I think what it's trying to say to me doesn't go far enough.
There's three possibilities for a ray hitting a "sane" mesh:
Hits the interior of a triangle: one hit, one triangle
Hits an edge: two hits, one for each triangle the edge belongs to
Hits a vertex: n hits, one for each triangle the vertex belongs to
So, my questions are:
How does trimesh.ray.raytriangle handle 3? From the comment, it's not clear what I should do in the case of 2 or 3. Maybe we can come up with something that provides some more direct guidance for edges, and a clear indication of vertex behavior.
As is, the comment appears to be incorrect when embree is used (see below).
For embree's handling of edge and vertex hits, a develop said:
Vertex hits are not detected reliably, for performance reasons.
For context, I'm making a, probably futile, attempt to quickly use this in a real world scenario, where a ray passing through without detection means real world things get smashed. 😅
The text was updated successfully, but these errors were encountered:
What do you think of this, for a modified comment?
Edge and vertex hits will not be detected reliably. Edges can result in 0, 1, or 2 hits and vertices can result in 0 to n hits, where n is the number of triangles that share that vertex. Multiple rays, with slight offsets, can be used to help prevent the 0 hit case.
RayMeshIntersector.intersects_location() has the following comment:
I'm having trouble understanding this, but I think what it's trying to say to me doesn't go far enough.
There's three possibilities for a ray hitting a "sane" mesh:
So, my questions are:
For embree's handling of edge and vertex hits, a develop said:
For context, I'm making a, probably futile, attempt to quickly use this in a real world scenario, where a ray passing through without detection means real world things get smashed. 😅
The text was updated successfully, but these errors were encountered: