pub struct ImplicitCellular { /* private fields */ }
Expand description
The Cellular function provides an interface to a CellularGenerator
to generate cellular noise based on the function originally written by Steve Worley. The function calculates F1,F2,F3 and F4 as distances to the first, second, third and fourth nearest seed points, applies the specified coefficients to the distances and sums them together, returning the result.
Implementations§
Source§impl ImplicitCellular
impl ImplicitCellular
pub fn new() -> ImplicitCellular
pub fn with_coefficients(a: f64, b: f64, c: f64, d: f64) -> ImplicitCellular
pub fn set_coefficients(&mut self, a: f64, b: f64, c: f64, d: f64)
pub fn set_cellular_source( &mut self, source: Option<Rc<RefCell<CellularGenerator>>>, )
Trait Implementations§
Source§impl ImplicitModule for ImplicitCellular
impl ImplicitModule for ImplicitCellular
fn set_seed(&mut self, seed: u32)
fn get_2d(&mut self, x: f64, y: f64) -> f64
fn get_3d(&mut self, x: f64, y: f64, z: f64) -> f64
fn get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_6d(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn set_deriv_spacing(&mut self, s: f64)
fn spacing(&self) -> f64
fn get_dx_2(&mut self, x: f64, y: f64) -> f64
fn get_dy_2(&mut self, x: f64, y: f64) -> f64
fn get_dx_3(&mut self, x: f64, y: f64, z: f64) -> f64
fn get_dy_3(&mut self, x: f64, y: f64, z: f64) -> f64
fn get_dz_3(&mut self, x: f64, y: f64, z: f64) -> f64
fn get_dx_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_dy_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_dz_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_dw_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_dx_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_dy_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_dz_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_dw_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_du_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_dv_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
Auto Trait Implementations§
impl Freeze for ImplicitCellular
impl !RefUnwindSafe for ImplicitCellular
impl !Send for ImplicitCellular
impl !Sync for ImplicitCellular
impl Unpin for ImplicitCellular
impl !UnwindSafe for ImplicitCellular
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