pub struct PedestrianObstacle<'a> {
pub id: u64,
pub pedestrian: &'a Pedestrian,
pub z: f64,
}Expand description
Thin obstacle adapter for a rustsim_crowd::Pedestrian.
Fields§
§id: u64Stable identifier supplied by the hosting simulation.
pedestrian: &'a PedestrianPedestrian state to expose as an obstacle.
z: f64Vertical coordinate to attach to the 2-D pedestrian state.
Implementations§
Source§impl<'a> PedestrianObstacle<'a>
impl<'a> PedestrianObstacle<'a>
Sourcepub fn ground(id: u64, pedestrian: &'a Pedestrian) -> Self
pub fn ground(id: u64, pedestrian: &'a Pedestrian) -> Self
Construct a pedestrian obstacle at ground level.
Sourcepub fn at_z(id: u64, pedestrian: &'a Pedestrian, z: f64) -> Self
pub fn at_z(id: u64, pedestrian: &'a Pedestrian, z: f64) -> Self
Construct a pedestrian obstacle at a specific vertical coordinate.
Trait Implementations§
Source§impl Obstacle for PedestrianObstacle<'_>
impl Obstacle for PedestrianObstacle<'_>
Source§fn snapshot(&self) -> ObstacleSnapshot
fn snapshot(&self) -> ObstacleSnapshot
Produce an instantaneous snapshot for broadphase insertion.
Auto Trait Implementations§
impl<'a> Freeze for PedestrianObstacle<'a>
impl<'a> RefUnwindSafe for PedestrianObstacle<'a>
impl<'a> Send for PedestrianObstacle<'a>
impl<'a> Sync for PedestrianObstacle<'a>
impl<'a> Unpin for PedestrianObstacle<'a>
impl<'a> UnsafeUnpin for PedestrianObstacle<'a>
impl<'a> UnwindSafe for PedestrianObstacle<'a>
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