pub struct WalkabilityRequest { /* private fields */ }Implementations§
Source§impl WalkabilityRequest
impl WalkabilityRequest
pub fn try_new( surfaces: Vec<ObjectId>, entrances: Vec<ObjectId>, obstacles: Vec<ObjectId>, minimum_width: f64, elevation_band: Option<LengthInterval>, traverse_verified_portals: bool, include_motion_envelopes: bool, ) -> Result<Self, WalkabilityError>
Sourcepub fn with_obstruction_depth(
self,
metres: f64,
) -> Result<Self, WalkabilityError>
pub fn with_obstruction_depth( self, metres: f64, ) -> Result<Self, WalkabilityError>
Tolerates obstacles intruding up to metres into a surface from its
boundary: whatever an obstacle occupies within that distance of the
surface’s plan boundary (a skirting, a pipe along the wall) does not
obstruct it. Zero, the default, tolerates nothing.
§Errors
WalkabilityError::InvalidTolerance when metres is not finite
and non-negative.
Sourcepub fn obstruction_depth_metres(&self) -> f64
pub fn obstruction_depth_metres(&self) -> f64
The depth, in metres, up to which obstacles may intrude.
Sourcepub fn with_surface_gap(self, metres: f64) -> Result<Self, WalkabilityError>
pub fn with_surface_gap(self, metres: f64) -> Result<Self, WalkabilityError>
Joins surfaces whose plans lie at most metres apart at overlapping
heights as if they touched, with the gap between them walkable: a
modelling gap between two spaces does not cut a route. Obstacles in
the gap still obstruct. Zero, the default, joins only surfaces that
touch.
§Errors
WalkabilityError::InvalidTolerance when metres is not finite
and non-negative.
Sourcepub fn surface_gap_metres(&self) -> f64
pub fn surface_gap_metres(&self) -> f64
The widest gap, in metres, joined between surfaces.
Sourcepub fn with_swept_doors(
self,
swept: Vec<SweptDoor>,
) -> Result<Self, WalkabilityError>
pub fn with_swept_doors( self, swept: Vec<SweptDoor>, ) -> Result<Self, WalkabilityError>
Counts the sectors swept doors sweep as obstacles on the surfaces
they stand on (see SweptDoor): a definite passage stays clear of
their circumscribed polygons, a proof that none exists holds against
their inscribed ones. A requested entrance is walked through, so a
backend never counts its own swing against a passage through it,
only against passages past it.
§Errors
WalkabilityError::ConflictingSweptDoors when one door is given
twice with different sectors.
Sourcepub fn swept_doors(&self) -> &[SweptDoor]
pub fn swept_doors(&self) -> &[SweptDoor]
The doors whose swept sectors are obstacles, sorted by door.
Sourcepub fn with_stated_clear_widths(
self,
widths: impl IntoIterator<Item = (ObjectId, f64)>,
) -> Result<Self, WalkabilityError>
pub fn with_stated_clear_widths( self, widths: impl IntoIterator<Item = (ObjectId, f64)>, ) -> Result<Self, WalkabilityError>
States, in metres, the clear width a requested entrance’s leaf and lining leave, as the rule reads it from its source (a door’s stated clear width, say). A backend bounds the entrance’s crossing by it from above and may use it to admit the body; it never widens what the geometry shows.
§Errors
WalkabilityError::InvalidStatedClearWidth when a width is not
finite and positive, an object is not a requested entrance, or one
entrance is stated twice.
Sourcepub fn stated_clear_width(&self, entrance: &ObjectId) -> Option<f64>
pub fn stated_clear_width(&self, entrance: &ObjectId) -> Option<f64>
The clear width stated for entrance, if any.
Sourcepub fn stated_clear_widths(&self) -> &BTreeMap<ObjectId, f64>
pub fn stated_clear_widths(&self) -> &BTreeMap<ObjectId, f64>
Every stated clear width, ordered by entrance.
Sourcepub fn with_connectors(
self,
connectors: Vec<VerticalConnector>,
) -> Result<Self, WalkabilityError>
pub fn with_connectors( self, connectors: Vec<VerticalConnector>, ) -> Result<Self, WalkabilityError>
Declares the vertical connectors the backend may join levels through.
§Errors
WalkabilityError::ConflictingConnector when one object is given
two kinds.