geom v0.1.0 Geom.Shape.NavigationMesh
A face-vertex representation of a navigation mesh.
Summary
Functions
Returns the face(s) that are connected to the given edge
Returns the face which contains or to which the given vertex belongs
Returns a list of the vertices connected by an edge to the given vertex if it’s part of the mesh
Types
t()
t :: %Geom.Shape.NavigationMesh{faces: [Geom.Shape.Face.t], vertices: %{optional(Geom.Shape.Vector.t) => %{optional(Geom.Shape.Face.t) => boolean}}}
Functions
find_connected_faces(navigation_mesh, edge)
find_connected_faces(Geom.Shape.NavigationMesh.t, {Geom.Shape.Vector.t, Geom.Shape.Vector.t}) :: [Geom.Shape.Face.t]
Returns the face(s) that are connected to the given edge.
find_containing_face(navigation_mesh, vertex)
find_containing_face(Geom.Shape.NavigationMesh.t, Geom.Shape.Vector.t) :: Geom.Shape.Face.t | nil
Returns the face which contains or to which the given vertex belongs.
get_adjacent_vertices(navigation_mesh, vertex)
get_adjacent_vertices(Geom.Shape.NavigationMesh.t, Geom.Shape.Vector.t) :: {atom, [Geom.Shape.Vector.t] | String.t}
Returns a list of the vertices connected by an edge to the given vertex if it’s part of the mesh.