shortestpath 0.10.0

Shortest Path is an experimental library finding the shortest path from A to B.
Documentation
// Copyright (C) 2025 Christian Mauduit <ufoot@ufoot.org>

//! Mesh reading utilities for loading pathfinding data from various sources.
//!
//! This module provides traits and implementations for reading mesh data from
//! different sources like text strings and images. It's separate from the core
//! pathfinding algorithms to keep concerns separated.
//!
//! # Main Types
//!
//! - [`CellType`] - Enum representing FREE or WALL cells
//! - [`Source2D`] - Trait for reading 2D grid data
//! - [`Source3D`] - Trait for reading 3D volume data
//!
//! # Examples
//!
//! ```
//! use shortestpath::mesh_source::{Source2D, CellType};
//!
//! // Any type implementing Source2D can provide cell data
//! struct MyGrid { width: usize, height: usize }
//!
//! impl Source2D for MyGrid {
//!     fn get(&self, x: usize, y: usize) -> Result<CellType, shortestpath::Error> {
//!         if x >= self.width || y >= self.height {
//!             return Err(shortestpath::Error::invalid_xy(x, y));
//!         }
//!         Ok(CellType::FLOOR)
//!     }
//!     fn width(&self) -> usize { self.width }
//!     fn height(&self) -> usize { self.height }
//! }
//! ```

mod cell_type;
mod repr;
mod source_2d;
mod source_2d_from_text;
mod source_3d;
mod source_3d_from_text;

#[cfg(feature = "image")]
mod source_2d_from_image;

#[cfg(feature = "image")]
mod source_3d_from_image;

#[cfg(test)]
mod testutil;

pub use cell_type::*;
pub use repr::*;
pub use source_2d::*;
pub use source_2d_from_text::*;
pub use source_3d::*;
pub use source_3d_from_text::*;

#[cfg(feature = "image")]
pub use source_2d_from_image::*;

#[cfg(feature = "image")]
pub use source_3d_from_image::*;