mymesh.rays.PointInTri#

mymesh.rays.PointInTri(pt, Tri, eps=1e-12, inclusive=True)[source]#

Test to determine whether a point is inside a triangle

Parameters:
  • Tri (array_like) – Coordinates of the three vertices of the triangle in the format np.array([[x0, y0, z0], [x1, y1, z1], [x2, y2, z2]])

  • pt (array_like) – Coordinates of the point to test

  • eps (float, optional) – Small tolerance parameter when points are on the edge of a triangle, by default 1e-12

  • inclusive (bool, optional) – Specifies whether a point on the edge of the triangle should be considered inside, by default True

Returns:

In – True if the point is inside the triangle

Return type:

bool