condor-pathfinding-geometry 0.4.0

Continuous polygonal pathfinding algorithms and geometry primitives for Condor.
Documentation
//! Owner crate for the continuous polygonal free-space lane.
//!
//! Runtime substrate ([`polygonal`]), the online [`continuous::PolygonPathfinder`]
//! trait and path types, exact solvers ([`visibility_graph`], [`topological_fracture_search`]),
//! and source-rooted prepared maps ([`shortest_path_map`]) live here. Free space
//! uses Euclidean polyline cost and the shared [`condor_core::SearchOutcome`]
//! found/no-path shape. The facade re-exports these modules under the `polygonal`
//! feature and still owns fixture packs / pack adapters; do not depend on this
//! crate for grid, any-angle, or navmesh surfaces.
//!
//! This owner crate depends on neutral core contracts, never on the public
//! facade. Corpus conformance belongs to the private harness package and
//! benchmark/capture evidence to the private bench package.
//!
//! Private not-ready candidates remain module-private and unreexported until
//! implemented and promoted through the ordinary geometry-family validation route.
//!
//! # Choose a continuous surface
//!
//! Use [`visibility_graph::VisibilityGraph`] or
//! [`topological_fracture_search::TopologicalFractureSearch`] for one exact
//! query in a polygon scene. For many goals from a fixed source, build a
//! [`shortest_path_map`] instead of rebuilding an online solver each time.
//!
//! # Example
//!
//! ```
//! use condor_geometry::{
//!     continuous::PolygonPathfinder,
//!     polygonal::{Point2, PolygonScene, PolygonSearchRequest, WorldBounds},
//!     visibility_graph::VisibilityGraph,
//! };
//!
//! let scene = PolygonScene {
//!     world_bounds: WorldBounds::new(Point2::new(0.0, 0.0), Point2::new(3.0, 3.0)),
//!     obstacles: Vec::new(),
//! };
//! let request = PolygonSearchRequest::new(Point2::new(0.5, 0.5), Point2::new(2.5, 2.5));
//! let result = VisibilityGraph.search(&scene, request).expect("request is valid");
//! assert!(result.is_found());
//! ```

#![forbid(unsafe_code)]

/// Online continuous pathfinder trait, polyline path, and search result vocabulary.
pub mod continuous;
/// Polygon scenes, world bounds, validation, and free-space walkability primitives.
pub mod polygonal;
/// Source-rooted prepared shortest-path maps for repeated polygonal queries.
pub mod shortest_path_map;
/// Exact topological-fracture continuous polygonal pathfinder.
pub mod topological_fracture_search;
/// Exact visibility-graph continuous polygonal pathfinder (sparse-scene baseline).
pub mod visibility_graph;

// Private retained candidates are deliberately not constructed or re-exported
// until a promotion decision; keep their identity/next-step metadata local.
#[allow(dead_code)]
mod continuous_map_prepared_geometry_kernel;
#[allow(dead_code)]
mod continuous_map_terminal_lower_bound_hierarchy;
#[allow(dead_code)]
mod topological_fracture_search_incumbent_exact_proof;
#[allow(dead_code)]
mod visibility_graph_lazy_indexed;
#[allow(dead_code)]
mod visibility_graph_prepared_tangent_overlay;
#[allow(dead_code)]
mod visibility_graph_taut_reflex_streaming;

pub use polygonal::{
    Point2, Polygon, PolygonEndpoint, PolygonScene, PolygonSearchRequest, PolygonValidationError,
    WorldBounds,
};