pub struct TraversalGraph { /* private fields */ }Expand description
Traversal graph derived from a field under one explicit envelope.
Implementations§
Source§impl TraversalGraph
impl TraversalGraph
Sourcepub fn build(
field: &LayeredField,
config: &FieldConfig,
envelope: &TraversalEnvelope,
) -> Result<Self, LayeredFieldError>
pub fn build( field: &LayeredField, config: &FieldConfig, envelope: &TraversalEnvelope, ) -> Result<Self, LayeredFieldError>
Build the graph from a sampled field.
Support candidates are the lowest crossing in each cell. A candidate
survives when the free span above it reaches agent_height and it is
still set after the blocking mask is inflated by agent_radius.
Sourcepub const fn evidence(&self) -> TraversalEvidence
pub const fn evidence(&self) -> TraversalEvidence
Geometric facts about the build.
Sourcepub fn node(&self, x: usize, y: usize) -> Option<SupportNode>
pub fn node(&self, x: usize, y: usize) -> Option<SupportNode>
Support node retained at (x, y), if any.
Sourcepub fn connected(&self, from: (usize, usize), to: (usize, usize)) -> bool
pub fn connected(&self, from: (usize, usize), to: (usize, usize)) -> bool
Whether two cells lie in the same connected component.
Sourcepub fn find_route(
&self,
from: (usize, usize),
to: (usize, usize),
) -> Result<RouteOutcome, LayeredFieldError>
pub fn find_route( &self, from: (usize, usize), to: (usize, usize), ) -> Result<RouteOutcome, LayeredFieldError>
Shortest 3D-length route under the envelope used to build this graph.
Ties are broken by the lower row-major node index, so the returned path is identical across runs and platforms.
Trait Implementations§
Source§impl Clone for TraversalGraph
impl Clone for TraversalGraph
Source§fn clone(&self) -> TraversalGraph
fn clone(&self) -> TraversalGraph
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TraversalGraph
impl RefUnwindSafe for TraversalGraph
impl Send for TraversalGraph
impl Sync for TraversalGraph
impl Unpin for TraversalGraph
impl UnwindSafe for TraversalGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more