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.