pub struct HeightMap { /* private fields */ }Implementations§
Source§impl HeightMap
impl HeightMap
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn height(&self, line: usize) -> f32
Sourcepub fn set(&mut self, line: usize, height: f32) -> f64
pub fn set(&mut self, line: usize, height: f32) -> f64
Sets the height of line; returns the change in total height.
Sourcepub fn fill(&mut self, lines: Range<usize>, height: f32)
pub fn fill(&mut self, lines: Range<usize>, height: f32)
Sets every line in lines to height, a chunk at a time.
Sourcepub fn splice(
&mut self,
line: usize,
removed: usize,
inserted: impl IntoIterator<Item = f32>,
)
pub fn splice( &mut self, line: usize, removed: usize, inserted: impl IntoIterator<Item = f32>, )
Replaces removed lines starting at line with inserted.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HeightMap
impl !RefUnwindSafe for HeightMap
impl !Sync for HeightMap
impl Forget for HeightMap
impl Move for HeightMap
impl Send for HeightMap
impl Unpin for HeightMap
impl UnsafeUnpin for HeightMap
impl UnwindSafe for HeightMap
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