Expand description
Exact visibility-graph continuous polygonal pathfinder (sparse-scene baseline). Exact polygonal pathfinder using a visibility graph over scene vertices.
§Surface
Online crate::continuous::PolygonPathfinder baseline for continuous free
space: no prepared surface—the graph is rebuilt every query. Each search:
- rejects non-walkable endpoints with typed errors;
- builds nodes =
{start, goal}∪ obstacle vertices; - inserts undirected edges for every pair that passes
PolygonScene::segment_is_walkablewith Euclidean edge cost; - runs Dijkstra from start to goal.
§Cost and behavior
Optimal under Condor’s f64 / epsilon walkability predicates (same cost
contract as TFS). Prefer TFS on sparse pillar forests; denser vertex sets
pay more here for all-pairs visibility tests. For many goals from one fixed
source, use crate::shortest_path_map instead of re-running this online.
§Examples
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());Structs§
- Visibility
Graph - Online exact continuous pathfinder: visibility graph + Dijkstra.