Skip to content
Snippets Groups Projects
Commit c00c8433 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

rayIntersection method checks for no hits

parent 8e61243a
No related branches found
No related tags found
No related merge requests found
......@@ -291,9 +291,12 @@ class TriangleMesh(object):
return_locations=True,
multiple_hits=False)
if tris.size == 0:
return np.zeros((0, 3)), np.zeros((0,))
# sort by ray. I'm Not sure if this is
# needed - does trimesh do it for us?
rayIdxs = np.argsort(rays)
rayIdxs = np.asarray(np.argsort(rays), np.int)
locs = locs[rayIdxs]
tris = tris[rayIdxs]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment