Struct voronator::VoronoiDiagram[][src]

pub struct VoronoiDiagram<C: Coord + Vector<C>> {
    pub sites: Vec<C>,
    pub delaunay: Triangulation,
    pub centers: Vec<C>,
    pub neighbors: Vec<Vec<usize>>,
    // some fields omitted
}
Expand description

Represents a Voronoi diagram.

Fields

sites: Vec<C>

Contains the input data

delaunay: Triangulation

A Triangulation struct that contains the Delaunay triangulation information.

centers: Vec<C>

Stores the circumcenter of each triangle

neighbors: Vec<Vec<usize>>

Stores the neighbor of each cell

Implementations

Creates a Voronoi diagram, if it exists, for a given set of points.

Points are represented here as anything that implements [delaunator::Coord and delaunator::Vector<Coord>]. delaunator::Coord: ./delaunator/trait.Coord.html

Creates a Voronoi diagram, if it exists, for a given set of points bounded by the supplied polygon.

Points are represented here as anything that implements [delaunator::Coord and delaunator::Vector<Coord>]. delaunator::Coord: ./delaunator/trait.Coord.html

Creates a Voronoi diagram, if it exists, for a given set of points.

Points are represented here as a (f64, f64) tuple.

Returns slice containing the valid cells in the Voronoi diagram.

Cells are represented as a Polygon.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.