pub struct ZoneWalkmap { /* private fields */ }Expand description
Optional 3D voxel walkability grid for a zone.
Implementations§
Source§impl ZoneWalkmap
impl ZoneWalkmap
Sourcepub fn new(
walkmap: Vec<bool>,
grid_w: usize,
grid_h: usize,
grid_d: usize,
) -> Result<Self, ZoneWalkmapError>
pub fn new( walkmap: Vec<bool>, grid_w: usize, grid_h: usize, grid_d: usize, ) -> Result<Self, ZoneWalkmapError>
Create a walkmap for a zone.
Sourcepub fn all_walkable(
grid_w: usize,
grid_h: usize,
grid_d: usize,
) -> Result<Self, ZoneWalkmapError>
pub fn all_walkable( grid_w: usize, grid_h: usize, grid_d: usize, ) -> Result<Self, ZoneWalkmapError>
Create a fully walkable (no obstacles) map.
Sourcepub fn dimensions(&self) -> (usize, usize, usize)
pub fn dimensions(&self) -> (usize, usize, usize)
Grid dimensions as (w, h, d).
Trait Implementations§
Source§impl Clone for ZoneWalkmap
impl Clone for ZoneWalkmap
Source§fn clone(&self) -> ZoneWalkmap
fn clone(&self) -> ZoneWalkmap
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 moreAuto Trait Implementations§
impl Freeze for ZoneWalkmap
impl RefUnwindSafe for ZoneWalkmap
impl Send for ZoneWalkmap
impl Sync for ZoneWalkmap
impl Unpin for ZoneWalkmap
impl UnsafeUnpin for ZoneWalkmap
impl UnwindSafe for ZoneWalkmap
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