[][src]Trait poisson2d::algorithm::Algorithm

pub trait Algorithm {
    fn next<R>(&mut self, _: &mut Builder, _: &mut R) -> Option<Vector2<f32>>
    where
        R: Rng
;
fn size_hint(&self, _: &Builder) -> (usize, Option<usize>);
fn restrict(&mut self, _: Vector2<f32>);
fn stays_legal(&self, _: &Builder, _: Vector2<f32>) -> bool; }

Trait that describes a Poisson disk sampling generating algorithm.

Required methods

fn next<R>(&mut self, _: &mut Builder, _: &mut R) -> Option<Vector2<f32>> where
    R: Rng

Generates new sample advancing the algorithm.

fn size_hint(&self, _: &Builder) -> (usize, Option<usize>)

Returns lower and upper bound of the amount of samples remaining for the algorithm to generate.

fn restrict(&mut self, _: Vector2<f32>)

Restricts the algorithm with an arbitrary sample.

Checks if a sample is valid for the Poisson disk sampling generated thus far by the algorithm.

Loading content...

Implementors

Loading content...