[][src]Struct voronator::CentroidDiagram

pub struct CentroidDiagram {
    pub sites: Vec<Point>,
    pub delaunay: Triangulation,
    pub centers: Vec<Point>,
    pub cells: Vec<Vec<Point>>,
    pub neighbors: Vec<Vec<usize>>,
}

Represents a centroidal tesselation diagram.

Fields

sites: Vec<Point>

Contains the input data

delaunay: Triangulation

A Triangulation struct that contains the Delaunay triangulation information.

centers: Vec<Point>

Stores the centroid of each triangle

cells: Vec<Vec<Point>>

Stores the coordinates of each vertex of a cell, in counter-clockwise order

neighbors: Vec<Vec<usize>>

Stores the neighbor of each cell

Implementations

impl CentroidDiagram[src]

pub fn new(points: &[Point]) -> Option<Self>[src]

Creates a centroidal tesselation, if it exists, for a given set of points.

Points are represented here as a delaunator::Point.

pub fn from_tuple(coords: &[(f64, f64)]) -> Option<Self>[src]

Creates a centroidal tesselation, if it exists, for a given set of points.

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

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.