source
source copied to clipboard
Mesh utilities: triangle - triangle intersection tests
As part of adding visualisation code to Raysect (#221) we need some support for calculating triangle-triangle intersections. The basic requirements:
- return True/False depending on if an intersection is detected.
- If an intersection is encountered, return the intersection path segment.
Note that there are many possible cases in this function, some much more difficult than others. To enable speedy development it may be acceptable to achieve partial functionality. I.e. if triangles are co-planar and a complex intersection path is detected, the code could raise a NotImplementedError. This may be enough to provide the desired functionality.