pub struct FarthestPointRequest { /* private fields */ }Expand description
The largest distance from any point of a region to the nearest of several targets.
The region is an object’s walkable area: the points of its plan, on its floor, that the mobility profile leaves free. Only those points count; a point inside an obstacle is none of the region’s.
With Self::with_costs, distances are weighted as for a
NearestTargetRequest; only a backend that weighs
travel is asked.
Implementations§
Source§impl FarthestPointRequest
impl FarthestPointRequest
Sourcepub fn try_new(
region: ObjectId,
targets: Vec<MetricPoint>,
profile: MobilityProfile,
tolerance_metres: f64,
) -> Result<Self, MetricRoutingError>
pub fn try_new( region: ObjectId, targets: Vec<MetricPoint>, profile: MobilityProfile, tolerance_metres: f64, ) -> Result<Self, MetricRoutingError>
Creates a request. tolerance_metres is how narrow the interval
should become; a backend may answer wider without claiming
convergence, never narrower than the truth.
Sourcepub fn with_costs(self, costs: Vec<TravelCost>) -> Self
pub fn with_costs(self, costs: Vec<TravelCost>) -> Self
The same request, counting travel over objects by their factors (sorted by object, each object’s greatest factor kept, factors of one dropped).
Sourcepub fn costs(&self) -> &[TravelCost]
pub fn costs(&self) -> &[TravelCost]
The costs travel counts by, sorted by object; empty for plain length.
Sourcepub fn with_connectors(self, connectors: ConnectorRouting) -> Self
pub fn with_connectors(self, connectors: ConnectorRouting) -> Self
The same request, climbing through connectors between levels
(see ConnectorRouting).
Sourcepub fn connectors(&self) -> Option<&ConnectorRouting>
pub fn connectors(&self) -> Option<&ConnectorRouting>
The connectors a route may climb through; None for a request that
leaves them to the backend.
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 interval width in metres.