Skip to main content

WalkabilityRequest

Struct WalkabilityRequest 

Source
pub struct WalkabilityRequest { /* private fields */ }

Implementations§

Source§

impl WalkabilityRequest

Source

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>

Source

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.

Source

pub fn obstruction_depth_metres(&self) -> f64

The depth, in metres, up to which obstacles may intrude.

Source

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.

Source

pub fn surface_gap_metres(&self) -> f64

The widest gap, in metres, joined between surfaces.

Source

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.

Source

pub fn swept_doors(&self) -> &[SweptDoor]

The doors whose swept sectors are obstacles, sorted by door.

Source

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.

Source

pub fn stated_clear_width(&self, entrance: &ObjectId) -> Option<f64>

The clear width stated for entrance, if any.

Source

pub fn stated_clear_widths(&self) -> &BTreeMap<ObjectId, f64>

Every stated clear width, ordered by entrance.

Source

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.

Source

pub fn connectors(&self) -> &[VerticalConnector]

Source

pub fn surfaces(&self) -> &[ObjectId]

Source

pub fn entrances(&self) -> &[ObjectId]

Source

pub fn obstacles(&self) -> &[ObjectId]

Source

pub fn minimum_width_metres(&self) -> f64

Source

pub fn elevation_band(&self) -> Option<LengthInterval>

Source

pub fn traverses_verified_portals(&self) -> bool

Source

pub fn includes_motion_envelopes(&self) -> bool

Trait Implementations§

Source§

impl Clone for WalkabilityRequest

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WalkabilityRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for WalkabilityRequest

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WalkabilityRequest

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.