Struct anl::ImplicitFractal
[−]
[src]
pub struct ImplicitFractal { /* fields omitted */ }
Fractals are a special type of combiner that combine up to 20 noise sources using fractal methods pioneered by Perlin, Musgrave, and friends. They come in various types (specifiable through set_type()
or in the constructor). Each fractal has up to 20 built-in BasisFunction
s whose basistype and interptype can be set via the provided methods. Additionally, you can obtain a pointer to any source of the fractal via get_basis()
. Any source module in the fractal may also be overridden by an external noise function via overrideSource(). The complexity of this system serves a purpose: "generic" fractals of a given type, with basis functions of all the same type, can easily be instance just by construction, yet more complex behavior can be produced by overriding layers with external sources, to build up very complex fractals, if so desired.
Fractals are highly parameterized. The two most useful parameters are numoctaves
which determines how many layers contribute to the fractal, and frequency
which specifies the density of the function. Frequency mimics combining a ScaleDomain
function to the source, multiplying the input coordinates by frequency before calculating the function. Other parameters that control the fractal are offset
, lacunarity
, gain
and H
. These parameters can have subtle, drastic, or no effect on the fractal, depending on the type, and they are typically best left alone.
Methods
impl ImplicitFractal
[src]
fn set_num_octaves(&mut self, n: u32)
fn set_frequency(&mut self, f: f64)
fn set_lacunarity(&mut self, l: f64)
fn set_gain(&mut self, g: f64)
fn set_offset(&mut self, o: f64)
fn set_h(&mut self, h: f64)
fn new(ftype: FractalType,
basistype: BasisType,
interptype: InterpType)
-> ImplicitFractal
basistype: BasisType,
interptype: InterpType)
-> ImplicitFractal
fn set_type(&mut self, t: FractalType)
fn set_all_source_types(&mut self, basis_type: BasisType, interp: InterpType)
fn set_source_type(&mut self,
which: usize,
basis_type: BasisType,
interp: InterpType)
which: usize,
basis_type: BasisType,
interp: InterpType)
fn override_source(&mut self,
which: usize,
b: Option<Rc<RefCell<ImplicitModule>>>)
which: usize,
b: Option<Rc<RefCell<ImplicitModule>>>)
fn reset_source(&mut self, which: usize)
fn reset_all_sources(&mut self)
fn get_basis(&mut self,
which: usize)
-> Option<Rc<RefCell<ImplicitBasisFunction>>>
which: usize)
-> Option<Rc<RefCell<ImplicitBasisFunction>>>
fn decarpentier_swiss_calc_weights(&mut self)
fn billow_calc_weights(&mut self)
fn multi_calc_weights(&mut self)
fn hybrid_multi_calc_weights(&mut self)
fn fbm_get_2d(&mut self, x: f64, y: f64) -> f64
fn fbm_get_3d(&mut self, x: f64, y: f64, z: f64) -> f64
fn fbm_get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn fbm_get_6d(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn multi_get_2d(&mut self, x: f64, y: f64) -> f64
fn multi_get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn multi_get_3d(&mut self, x: f64, y: f64, z: f64) -> f64
fn multi_get_6d(&mut self,
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
fn billow_get_2d(&mut self, x: f64, y: f64) -> f64
fn billow_get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn billow_get_3d(&mut self, x: f64, y: f64, z: f64) -> f64
fn billow_get_6d(&mut self,
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
fn ridged_multi_get_2d(&mut self, x: f64, y: f64) -> f64
fn ridged_multi_get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn ridged_multi_get_3d(&mut self, x: f64, y: f64, z: f64) -> f64
fn ridged_multi_get_6d(&mut self,
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
fn hybrid_multi_get_2d(&mut self, x: f64, y: f64) -> f64
fn hybrid_multi_get_3d(&mut self, x: f64, y: f64, z: f64) -> f64
fn hybrid_multi_get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn hybrid_multi_get_6d(&mut self,
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
fn decarpentier_swiss_get_2d(&mut self, x: f64, y: f64) -> f64
fn decarpentier_swiss_get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn decarpentier_swiss_get_3d(&mut self, x: f64, y: f64, z: f64) -> f64
fn decarpentier_swiss_get_6d(&mut self,
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64
x: f64,
y: f64,
z: f64,
w: f64,
u: f64,
v: f64)
-> f64