Solver#
- solve_ray_bboxes_intersections(ray_origin, ray_direction, bboxes: List[Tuple] | Tuple) Tuple[ndarray, ndarray, ndarray][source]#
for each set of bbox plane, solve the intersection with the ray [t1,t2] then the intersection point should be intersection of [t1x,t2x], [t1y,t2y], [t1z,t2z] return [t1, t2], if no intersection return [0, inf]
- solve_ray_ray_intersection(ray1_origin, ray1_direction, ray2_origin, ray2_direction)[source]#
Computes ray-ray intersection/closest point with hard clamping for t > 0.
- Returns:
Parameters for the closest points. P (np.array): intersection_point. n (np.array): The surface normal that reflects beam1 to beam2.
- Return type:
t1, t2 (float)