Crate shortestpath

Crate shortestpath 

Source
Expand description

Shortest Path is an experimental library finding the shortest path from A to B

It aims primarily at powering Liquid War 7 but could be of wider use. Who knows.

Shortest Path icon

Re-exports§

pub use mesh::*;

Modules§

mesh
mesh_2d
2D mesh implementations and utilities for pathfinding on grids.
mesh_3d
True 3D mesh implementations for volumetric pathfinding.
mesh_25d
2.5D mesh implementations for layered pathfinding.
mesh_source
Mesh reading utilities for loading pathfinding data from various sources.
mesh_topo
Dynamic topology for meshes with conditional connectivity.

Structs§

Gate
Represents a connection to a neighboring node in the pathfinding graph.
Gradient
Stores pathfinding results as a gradient field over a mesh.

Enums§

Error

Constants§

BUG_REPORT_URL
URL to report bugs.
DISTANCE_DIAGONAL
Distance for diagonal movement in a grid.
DISTANCE_DIAGONAL_3D
Distance for 3D diagonal movement across layers.
DISTANCE_MAX
Maximum distance value, representing unreachable or uninitialized nodes.
DISTANCE_MIN
Minimum distance value, representing zero distance.
DISTANCE_STRAIGHT
Distance for orthogonal (straight) movement in a grid.

Functions§

best_for_indexes
Finds the mesh index that minimizes the sum of squared distances to a set of target indices.
ordered_indexes
Returns all mesh indexes ordered by their gradient distance, from closest to furthest.
worst_for_indexes
Finds the mesh index that maximizes the sum of squared distances to a set of target indices.
xy_to_closest_index
Finds the index of the closest walkable cell to the given 2D coordinates.
xyz_to_closest_index
Finds the index of the closest walkable cell to the given 3D coordinates.

Type Aliases§

Result