Trait Algorithm

Source
pub trait Algorithm {
    // Required methods
    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;
}
Expand description

Trait that describes a Poisson disk sampling generating algorithm.

Required Methods§

Source

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

Generates new sample advancing the algorithm.

Source

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

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

Source

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§