Struct ImplicitBasisFunction

Source
pub struct ImplicitBasisFunction { /* private fields */ }
Expand description

The BasisFunction function encapsulates basic noise generators. The function is customizable; you can choose what type of noise to generate and what interpolation style to use. The types of basis and interpolation functions are enumerated as enum.BasisType.html and enum.InterpType.html respectively.

In order to mitigate the occurrence of grid-aligned artifacts, especially in fractal functions, basis functions incorporate a 2D axial rotation (for 2D variants) and a 3D axial rotation (for 3D and above variants) that are seeded to randomized axis/angles when the function is constructed. These randomized rotations alter the alignment of the function with the lattice boundaries, and serve in most cases to help obscure the grid artifacts.

BasisFunction serves as the primary signal generator for ANL.

Implementations§

Source§

impl ImplicitBasisFunction

Source

pub fn new() -> ImplicitBasisFunction

Source

pub fn with_types(btype: BasisType, itype: InterpType) -> ImplicitBasisFunction

Source

pub fn set_type(&mut self, t: BasisType)

Source

pub fn set_interp(&mut self, interp: InterpType)

Source

pub fn set_rotation_angle(&mut self, x: f64, y: f64, z: f64, angle: f64)

Source

pub fn set_magic_numbers(&mut self, btype: BasisType)

Trait Implementations§

Source§

impl Default for ImplicitBasisFunction

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl ImplicitModule for ImplicitBasisFunction

Source§

fn set_seed(&mut self, seed: u32)

Source§

fn get_2d(&mut self, x: f64, y: f64) -> f64

Source§

fn get_3d(&mut self, x: f64, y: f64, z: f64) -> f64

Source§

fn get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64

Source§

fn get_6d(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64

Source§

fn spacing(&self) -> f64

Source§

fn set_deriv_spacing(&mut self, s: f64)

Source§

fn get_dx_2(&mut self, x: f64, y: f64) -> f64

Source§

fn get_dy_2(&mut self, x: f64, y: f64) -> f64

Source§

fn get_dx_3(&mut self, x: f64, y: f64, z: f64) -> f64

Source§

fn get_dy_3(&mut self, x: f64, y: f64, z: f64) -> f64

Source§

fn get_dz_3(&mut self, x: f64, y: f64, z: f64) -> f64

Source§

fn get_dx_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64

Source§

fn get_dy_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64

Source§

fn get_dz_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64

Source§

fn get_dw_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64

Source§

fn get_dx_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64

Source§

fn get_dy_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64

Source§

fn get_dz_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64

Source§

fn get_dw_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64

Source§

fn get_du_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64

Source§

fn get_dv_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.