Skip to main content

projective_grid/hex/
mod.rs

1//! Hexagonal grid support for pointy-top axial coordinates.
2//!
3//! This module provides hex-grid counterparts of the square-grid types
4//! in the parent crate: 6-connected graph construction, BFS traversal,
5//! smoothness analysis, D6 alignment transforms, and rectification.
6//!
7//! # Coordinate Convention
8//!
9//! Axial coordinates `(q, r)` are stored in [`GridIndex`](crate::GridIndex)
10//! where `i = q` and `j = r`. Pointy-top orientation: `q` increases eastward,
11//! `r` increases south-eastward.
12
13pub mod alignment;
14pub mod direction;
15pub mod graph;
16pub mod mesh;
17pub mod rectify;
18pub mod smoothness;
19pub mod traverse;
20
21pub use alignment::GRID_TRANSFORMS_D6;
22pub use direction::{HexDirection, HexNodeNeighbor};
23pub use graph::{HexGridGraph, HexNeighborValidator};
24pub use mesh::{AffineTransform2D, HexGridHomographyMesh, HexMeshError};
25pub use rectify::{HexGridHomography, HexRectifyError};
26pub use smoothness::{hex_find_inconsistent_corners, hex_predict_grid_position};
27pub use traverse::{hex_assign_grid_coordinates, hex_connected_components};