warp.geometry.find_triangle_neighbor_edge_index#
- warp.geometry.find_triangle_neighbor_edge_index = <Function find_triangle_neighbor_edge_index(triangle_neighbors: array(ndim=2, dtype=int32), triangle: int32, neighbor: int32)>#
Return the local edge of
triangleshared withneighbor.- Parameters:
triangle_neighbors (warp.array2d[warp.int32]) – The
(num_tris, 3)adjacency array built bytri_tri_adjacency()(itstriangle_neighborsoutput).triangle (int32) – Index of the triangle to search.
neighbor (int32) – Index of the triangle to find among
triangle’s neighbors.
- Returns:
The local edge index
jsuch thattriangle_neighbors[triangle, j] == neighbor, or -1 iftriangleandneighborare not adjacent. Calling this withtriangleandneighborswapped recovers a single entry – the valuetri_tri_adjacency()would have stored inneighbor_edge_indiceshad it been called withreturn_neighbor_edge_indices=True– without having to keep that array around.- Return type: