condor_geometry/lib.rs
1//! Owner crate for the continuous polygonal free-space lane.
2//!
3//! Runtime substrate ([`polygonal`]), the online [`continuous::PolygonPathfinder`]
4//! trait and path types, exact solvers ([`visibility_graph`], [`topological_fracture_search`]),
5//! and source-rooted prepared maps ([`shortest_path_map`]) live here. Free space
6//! uses Euclidean polyline cost and the shared [`condor_core::SearchOutcome`]
7//! found/no-path shape. The facade re-exports these modules under the `polygonal`
8//! feature and still owns fixture packs / pack adapters; do not depend on this
9//! crate for grid, any-angle, or navmesh surfaces.
10//!
11//! This owner crate depends on neutral core contracts, never on the public
12//! facade. Corpus conformance belongs to the private harness package and
13//! benchmark/capture evidence to the private bench package.
14//!
15//! Private not-ready candidates remain module-private and unreexported until
16//! implemented and promoted through the ordinary geometry-family validation route.
17//!
18//! # Choose a continuous surface
19//!
20//! Use [`visibility_graph::VisibilityGraph`] or
21//! [`topological_fracture_search::TopologicalFractureSearch`] for one exact
22//! query in a polygon scene. For many goals from a fixed source, build a
23//! [`shortest_path_map`] instead of rebuilding an online solver each time.
24//!
25//! # Example
26//!
27//! ```
28//! use condor_geometry::{
29//! continuous::PolygonPathfinder,
30//! polygonal::{Point2, PolygonScene, PolygonSearchRequest, WorldBounds},
31//! visibility_graph::VisibilityGraph,
32//! };
33//!
34//! let scene = PolygonScene {
35//! world_bounds: WorldBounds::new(Point2::new(0.0, 0.0), Point2::new(3.0, 3.0)),
36//! obstacles: Vec::new(),
37//! };
38//! let request = PolygonSearchRequest::new(Point2::new(0.5, 0.5), Point2::new(2.5, 2.5));
39//! let result = VisibilityGraph.search(&scene, request).expect("request is valid");
40//! assert!(result.is_found());
41//! ```
42
43#![forbid(unsafe_code)]
44
45/// Online continuous pathfinder trait, polyline path, and search result vocabulary.
46pub mod continuous;
47/// Polygon scenes, world bounds, validation, and free-space walkability primitives.
48pub mod polygonal;
49/// Source-rooted prepared shortest-path maps for repeated polygonal queries.
50pub mod shortest_path_map;
51/// Exact topological-fracture continuous polygonal pathfinder.
52pub mod topological_fracture_search;
53/// Exact visibility-graph continuous polygonal pathfinder (sparse-scene baseline).
54pub mod visibility_graph;
55
56// Private retained candidates are deliberately not constructed or re-exported
57// until a promotion decision; keep their identity/next-step metadata local.
58#[allow(dead_code)]
59mod continuous_map_prepared_geometry_kernel;
60#[allow(dead_code)]
61mod continuous_map_terminal_lower_bound_hierarchy;
62#[allow(dead_code)]
63mod topological_fracture_search_incumbent_exact_proof;
64#[allow(dead_code)]
65mod visibility_graph_lazy_indexed;
66#[allow(dead_code)]
67mod visibility_graph_prepared_tangent_overlay;
68#[allow(dead_code)]
69mod visibility_graph_taut_reflex_streaming;
70
71pub use polygonal::{
72 Point2, Polygon, PolygonEndpoint, PolygonScene, PolygonSearchRequest, PolygonValidationError,
73 WorldBounds,
74};