Skip to main content

PolygonPathfinder

Trait PolygonPathfinder 

Source
pub trait PolygonPathfinder {
    // Required methods
    fn name(&self) -> &'static str;
    fn search(
        &self,
        scene: &PolygonScene,
        request: PolygonSearchRequest,
    ) -> PolygonSearchResult;
}
Expand description

Online exact pathfinder over a static polygonal obstacle scene.

Pair-search surface for one start–goal query. Implementations reject endpoints that fail PolygonScene::is_walkable with PolygonSearchError, honor optional condor_core::SearchBudget on the request, and otherwise return found/no-path with Euclidean polyline cost. Endpoints that pass the looser walkability check but fail full PolygonScene::validate (for example sealed boundary) typically yield Ok(NoPath) rather than Err—match the baseline solvers when implementing. For many goals from one fixed source, use crate::shortest_path_map instead of this online trait.

Required Methods§

Source

fn name(&self) -> &'static str

Stable algorithm identifier for benchmarks, logs, and solver portfolios.

Source

fn search( &self, scene: &PolygonScene, request: PolygonSearchRequest, ) -> PolygonSearchResult

Runs one search on scene for request.

Returns Err for non-walkable endpoints or exhausted budgets, Ok(NoPath) when no free-space route exists (including some sealed-endpoint cases after validation), and Ok(Found) with a non-empty polyline when a route is found.

§Errors

Returns PolygonSearchError when an endpoint is non-walkable or the caller budget is exhausted before found/no-path completes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§