hey guys is there a faster way to get the intersections between rays and a mesh than using trimesh in python?
So right now I am doing this approach: Stackoverflow: Python Intersections ray and mesh
Snippet of my code:
import numpy as np
import trimesh
# load mesh
mesh = trimesh.load_mesh('test.ply')
# create some rays
ray_origins = np.load('origins.npy') # Shape = (100'000, 3)
ray_directions = np.array('directions.npy') #Shape = (100'000, 3)
# Get the intersections
locations, index_ray, index_tri = mesh.ray.intersects_location(
ray_origins=ray_origins, ray_directions=ray_directions)
But it is really slow for many rays.. Is there a faster way?