pub struct ForcedWalkRequest { /* private fields */ }Expand description
The shortest walk from a point to the nearest of several targets that enters an object’s plan footprint (touching it counts).
A lower bound beyond the upper bound of the plain walk’s length proves
that no shortest walk enters the object. With Self::with_avoided
every walk keeps out of the named objects, as for a
NearestTargetRequest.
Implementations§
Source§impl ForcedWalkRequest
impl ForcedWalkRequest
Sourcepub fn try_new(
origin: MetricPoint,
targets: Vec<MetricPoint>,
through: ObjectId,
profile: MobilityProfile,
tolerance_metres: f64,
) -> Result<Self, MetricRoutingError>
pub fn try_new( origin: MetricPoint, targets: Vec<MetricPoint>, through: ObjectId, profile: MobilityProfile, tolerance_metres: f64, ) -> Result<Self, MetricRoutingError>
Creates a request; tolerance_metres is how narrow the bracket
should become.
§Errors
MetricRoutingError::NoTargets for no target,
MetricRoutingError::InvalidTolerance for a negative or
non-finite tolerance.
Sourcepub fn with_avoided(self, avoided: Vec<ObjectId>) -> Self
pub fn with_avoided(self, avoided: Vec<ObjectId>) -> Self
The same request, walking around avoided (sorted, deduplicated).
Sourcepub fn with_connectors(self, connectors: ConnectorRouting) -> Self
pub fn with_connectors(self, connectors: ConnectorRouting) -> Self
The same request, climbing through connectors between levels.
Sourcepub fn origin(&self) -> &MetricPoint
pub fn origin(&self) -> &MetricPoint
Where every walk starts.
Sourcepub fn targets(&self) -> &[MetricPoint]
pub fn targets(&self) -> &[MetricPoint]
The targets, in request order.
Sourcepub fn profile(&self) -> MobilityProfile
pub fn profile(&self) -> MobilityProfile
Mobility envelope.
Sourcepub fn tolerance_metres(&self) -> f64
pub fn tolerance_metres(&self) -> f64
Requested bracket width in metres.
Sourcepub fn connectors(&self) -> Option<&ConnectorRouting>
pub fn connectors(&self) -> Option<&ConnectorRouting>
The connectors a walk may climb through.