pub struct Heights {
pub size: usize,
pub values: Vec<i16>,
}Expand description
A map’s heights, owned, as the game state holds them (not in the original, which keeps them
in its terrain): (size + 1)² values, row by row, height × 256. Heights::grid lends them
as a HeightGrid for queries.
Fields§
§size: usizeThe cells on each side.
values: Vec<i16>The heights, height × 256.
Implementations§
Source§impl Heights
impl Heights
Sourcepub fn grid(&self) -> HeightGrid<'_>
pub fn grid(&self) -> HeightGrid<'_>
The heights as a HeightGrid.
Trait Implementations§
impl Eq for Heights
impl StructuralPartialEq for Heights
Auto Trait Implementations§
impl Freeze for Heights
impl RefUnwindSafe for Heights
impl Send for Heights
impl Sync for Heights
impl Unpin for Heights
impl UnsafeUnpin for Heights
impl UnwindSafe for Heights
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