1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (C) 2025 Christian Mauduit <ufoot@ufoot.org>
//! True 3D mesh implementations for volumetric pathfinding.
//!
//! This module provides structures and traits for pathfinding in true 3D spaces with
//! full volumetric connectivity. Each cell can connect to all 26 neighboring cells:
//! - 8 neighbors in the current layer (4 orthogonal + 4 diagonal)
//! - 9 neighbors in the layer above (including diagonals)
//! - 9 neighbors in the layer below (including diagonals)
//!
//! This true 3D approach is ideal for:
//! - Flight simulators or space games
//! - Underwater/aerial navigation
//! - Mining/voxel games where you can move diagonally between layers
//! - Any scenario requiring full 3D movement with diagonal transitions
//!
//! For simpler layered movement (2D within layers + vertical transitions only),
//! see the [`mesh_25d`](crate::mesh_25d) module which provides 10-neighbor connectivity.
//!
//! # Main Types
//!
//! - [`Full3D`] - A fully connected rectangular volume where all cells are walkable.
//! Each cell can connect to all 26 neighbors (8 in-layer + 9 above + 9 below).
//!
//! - [`Compact3D`] - An optimized 3D volume that supports walls/obstacles. It compresses
//! walkable cells and pre-computes successors for memory efficiency.
//!
//! # Traits
//!
//! - [`Shape3D`] - Provides volume dimensions via `shape()` returning `(width, height, depth)`.
//!
//! - [`Index3D`] - Converts between 3D coordinates `(x, y, z)` and linear indices.
//!
//! # Utilities
//!
//! - `repr_3d` - Functions for visualizing 3D meshes and gradients as text.
//!
//! # Example
//!
//! ```
//! use shortestpath::{Gradient, Mesh, mesh_3d::Full3D};
//!
//! // Create a 10x10x10 volume
//! let mesh = Full3D::new(10, 10, 10);
//!
//! // Setup pathfinding with center as target
//! let mut gradient = Gradient::from_mesh(&mesh);
//! gradient.set_distance(555, 0.0); // Center of 10x10x10 volume
//! gradient.spread(&mesh);
//!
//! // Query distance from corner to center
//! let distance = gradient.get_distance(0);
//! println!("Distance from corner to center: {}", distance);
//! ```
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;