MCPcopy Create free account
hub / github.com/danieljfarrell/pvtrace / intersection_point_is_ahead

Function intersection_point_is_ahead

pvtrace/geometry/utils.py:431–440  ·  view source on GitHub ↗

Returns true if the intersection point is ahead of the rays trajectory. Notes ----- The intersection point must be a point on the line, p(a) = p0 + a * n.

(ray_position, ray_direction, intersection_point)

Source from the content-addressed store, hash-verified

429
430
431def intersection_point_is_ahead(ray_position, ray_direction, intersection_point):
432 """ Returns true if the intersection point is ahead of the rays trajectory.
433
434 Notes
435 -----
436 The intersection point must be a point on the line, p(a) = p0 + a * n.
437 """
438 return (
439 np.dot(ray_direction, intersection_point) - np.dot(ray_direction, ray_position)
440 ) > EPS_ZERO

Callers 1

intersectionsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected