pub struct HeightMapFilter;Expand description
Operations that work in gradient/frequency domain.
Implementations§
Source§impl HeightMapFilter
impl HeightMapFilter
Sourcepub fn high_pass(map: &HeightMap, radius: usize) -> HeightMap
pub fn high_pass(map: &HeightMap, radius: usize) -> HeightMap
Apply a high-pass filter (removes low frequencies).
Sourcepub fn low_pass(map: &HeightMap, radius: usize) -> HeightMap
pub fn low_pass(map: &HeightMap, radius: usize) -> HeightMap
Apply a low-pass filter (removes high frequencies / smoothing).
Sourcepub fn band_pass(
map: &HeightMap,
low_radius: usize,
high_radius: usize,
) -> HeightMap
pub fn band_pass( map: &HeightMap, low_radius: usize, high_radius: usize, ) -> HeightMap
Band-pass filter: keeps frequencies between low_radius and high_radius.
Sourcepub fn emboss(map: &HeightMap) -> HeightMap
pub fn emboss(map: &HeightMap) -> HeightMap
Emboss filter: emphasizes edges to create a metallic/3D impression.
Sourcepub fn morphological_erosion(map: &HeightMap, radius: usize) -> HeightMap
pub fn morphological_erosion(map: &HeightMap, radius: usize) -> HeightMap
Erosion morphological operator: each cell takes the minimum of its neighborhood.
Sourcepub fn morphological_dilation(map: &HeightMap, radius: usize) -> HeightMap
pub fn morphological_dilation(map: &HeightMap, radius: usize) -> HeightMap
Dilation morphological operator: each cell takes the maximum of its neighborhood.
Sourcepub fn morphological_open(map: &HeightMap, radius: usize) -> HeightMap
pub fn morphological_open(map: &HeightMap, radius: usize) -> HeightMap
Opening: erosion followed by dilation (removes small peaks).
Sourcepub fn morphological_close(map: &HeightMap, radius: usize) -> HeightMap
pub fn morphological_close(map: &HeightMap, radius: usize) -> HeightMap
Closing: dilation followed by erosion (fills small valleys).
Auto Trait Implementations§
impl Freeze for HeightMapFilter
impl RefUnwindSafe for HeightMapFilter
impl Send for HeightMapFilter
impl Sync for HeightMapFilter
impl Unpin for HeightMapFilter
impl UnsafeUnpin for HeightMapFilter
impl UnwindSafe for HeightMapFilter
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.