Instance Method


The triangle definition at the specified index.


func triangle(at index: Int) -> GKTriangle



An index identifying the triangle. Must be less than the value of the triangleCount property.

Return Value

A structure describing the specified triangle.


This method provides valid results only after calling the triangulate() to create a mesh around the current configuration of obstacles. The information this method provides can be useful for drawing your own overlay UI to debug the graphs you create.

See Also

Managing the Mesh

func triangulate()

Creates or updates the graph with a network of nodes that describes the open space around its obstacles.

var triangulationMode: GKMeshGraphTriangulationMode

A set of options for how to place graph nodes when triangulating the graph.

var triangleCount: Int

The number of triangles in the mesh.