[−][src]Struct map_model::pathfind::Path
Fields
steps: VecDeque<PathStep>
orig_req: PathRequest
total_length: Distance
crossed_so_far: Distance
uber_turns: VecDeque<UberTurn>
currently_inside_ut: Option<UberTurn>
Implementations
impl Path
[src]
pub(crate) fn new(
map: &Map,
steps: Vec<PathStep>,
orig_req: PathRequest,
uber_turns: Vec<UberTurn>
) -> Path
[src]
map: &Map,
steps: Vec<PathStep>,
orig_req: PathRequest,
uber_turns: Vec<UberTurn>
) -> Path
pub fn dist_crossed_from_step(&self, map: &Map, step: &PathStep) -> Distance
[src]
Once we finish this PathStep, how much distance will be crossed? If the step is at the beginning or end of our path, then the full length may not be used.
pub fn one_step(req: PathRequest, map: &Map) -> Path
[src]
pub fn get_req(&self) -> &PathRequest
[src]
The original PathRequest used to produce this path. If the path has been modified since creation, the start and end of the request won't match up with the current path steps.
pub fn crossed_so_far(&self) -> Distance
[src]
pub fn total_length(&self) -> Distance
[src]
pub fn percent_dist_crossed(&self) -> f64
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn is_last_step(&self) -> bool
[src]
pub fn isnt_last_step(&self) -> bool
[src]
pub fn currently_inside_ut(&self) -> &Option<UberTurn>
[src]
pub fn about_to_start_ut(&self) -> Option<&UberTurn>
[src]
pub fn shift(&mut self, map: &Map) -> PathStep
[src]
pub fn add(&mut self, step: PathStep, map: &Map)
[src]
pub fn is_upcoming_uber_turn_component(&self, t: TurnID) -> bool
[src]
pub fn modify_step(&mut self, idx: usize, step: PathStep, map: &Map)
[src]
Trusting the caller to do this in valid ways.
pub fn current_step(&self) -> PathStep
[src]
pub fn next_step(&self) -> PathStep
[src]
pub fn maybe_next_step(&self) -> Option<PathStep>
[src]
pub fn last_step(&self) -> PathStep
[src]
pub fn trace(&self, map: &Map) -> Option<PolyLine>
[src]
Traces along the path from its originally requested start. This is only valid to call for an umodified path.
pub fn trace_from_start(
&self,
map: &Map,
start_dist: Distance
) -> Option<PolyLine>
[src]
&self,
map: &Map,
start_dist: Distance
) -> Option<PolyLine>
Traces along the path from a specified distance along the first step until the end.
pub fn get_steps(&self) -> &VecDeque<PathStep>
[src]
fn append(&mut self, other: Path, map: &Map)
[src]
pub fn estimate_duration(
&self,
map: &Map,
constraints: PathConstraints,
max_speed: Option<Speed>
) -> Duration
[src]
&self,
map: &Map,
constraints: PathConstraints,
max_speed: Option<Speed>
) -> Duration
Estimate how long following the path will take in the best case, assuming no traffic or delay at intersections. To determine the speed along each step, the agent following their path and their optional max_speed must be specified.
Trait Implementations
impl Clone for Path
[src]
impl Debug for Path
[src]
impl<'de> Deserialize<'de> for Path
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<Path> for Path
[src]
impl Serialize for Path
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Path
[src]
Auto Trait Implementations
impl RefUnwindSafe for Path
[src]
impl Send for Path
[src]
impl Sync for Path
[src]
impl Unpin for Path
[src]
impl UnwindSafe for Path
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,