Triangle32.compute_intersect

giant.ray_tracer.shapes.triangle:

Triangle32.compute_intersect(self, ray)

This method computes the intersects between a single ray and the surface describe by this object.

This is done by make a call to the efficient C implementation of the method. This method packages everything in the way that the C method expects and restructures the results into the expect numpy structured array.

In general, if you are tracing multiple rays you should use the trace() method which is more optimized for multi ray tracing.

Parameters:

ray (Rays) – The ray to trace to the surce

Returns:

a length 1 numpy array with a dtype of INTERSECT_DTYPE

Return type:

np.ndarray