pub struct LayeredSpace {
pub floor_elevations: Vec<(FloorId, f64)>,
pub walls: Vec<WallPolygon3D>,
pub connectors: Vec<FloorTransition>,
}Expand description
A multi-floor environment.
Fields§
§floor_elevations: Vec<(FloorId, f64)>Z coordinate of each floor slab (indexed by FloorId).
walls: Vec<WallPolygon3D>Walls per floor.
connectors: Vec<FloorTransition>Connectors between floors.
Implementations§
Source§impl LayeredSpace
impl LayeredSpace
Sourcepub fn set_floor(&mut self, floor: FloorId, z: f64)
pub fn set_floor(&mut self, floor: FloorId, z: f64)
Register a floor at elevation z. Overwrites any previous entry.
Sourcepub fn segments_on_floor(&self, floor: FloorId) -> Vec<WallSegment>
pub fn segments_on_floor(&self, floor: FloorId) -> Vec<WallSegment>
Gather walls on a specific floor as 2-D segments.
Sourcepub fn connector(&self, id: u64) -> Option<&FloorTransition>
pub fn connector(&self, id: u64) -> Option<&FloorTransition>
Connector with a matching id, if any.
Sourcepub fn connector_at(
&self,
floor: FloorId,
pos: Vec2,
) -> Option<&FloorTransition>
pub fn connector_at( &self, floor: FloorId, pos: Vec2, ) -> Option<&FloorTransition>
Pick the first connector on floor whose boarding zone contains pos.
Trait Implementations§
Source§impl Clone for LayeredSpace
impl Clone for LayeredSpace
Source§fn clone(&self) -> LayeredSpace
fn clone(&self) -> LayeredSpace
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayeredSpace
impl Debug for LayeredSpace
Auto Trait Implementations§
impl Freeze for LayeredSpace
impl RefUnwindSafe for LayeredSpace
impl Send for LayeredSpace
impl Sync for LayeredSpace
impl Unpin for LayeredSpace
impl UnsafeUnpin for LayeredSpace
impl UnwindSafe for LayeredSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more