Type Alias spade::handles::DirectedVoronoiEdge

source ·
pub type DirectedVoronoiEdge<'a, V, DE, UE, F> = DynamicHandleImpl<'a, V, DE, UE, F, DirectedVoronoiEdgeTag, InnerTag>;
Expand description

A handle to a directed edge of the Voronoi diagram.

Several methods are defined to explore adjacent edges, faces and vertices:

edge edge.rev() edge.next() edge.prev()

Aliased Type§

struct DirectedVoronoiEdge<'a, V, DE, UE, F> { /* private fields */ }

Implementations§

source§

impl<'a, V, DE, UE, F> DirectedVoronoiEdge<'a, V, DE, UE, F>

source

pub fn to(&self) -> VoronoiVertex<'a, V, DE, UE, F>

Returns the voronoi edge’s destination.

source

pub fn from(&self) -> VoronoiVertex<'a, V, DE, UE, F>

Returns the voronoi vertex from which this edge originates.

source

pub fn face(&self) -> VoronoiFace<'a, V, DE, UE, F>

Returns the Voronoi face to the left of this Voronoi edge

source

pub fn as_undirected(&self) -> UndirectedVoronoiEdge<'a, V, DE, UE, F>

Converts this directed edge handle into an undirected edge handle.

See also the handles module for more information.

source

pub fn as_delaunay_edge(&self) -> DirectedEdgeHandle<'a, V, DE, UE, F>

Returns the directed dual edge of the underlying Delaunay triangulation.

The dual edge is always orthogonal to this edge.

Shows various inner voronoi edges (blue) and their dual Delaunay edges (orange)

source

pub fn rev(&self) -> Self

Returns this edge with its direction reversed.

source

pub fn next(&self) -> DirectedVoronoiEdge<'a, V, DE, UE, F>

Returns the edge that is connected to this edge in counterclockwise order.

See also prev

source

pub fn prev(&self) -> DirectedVoronoiEdge<'a, V, DE, UE, F>

Returns the edge that is connected to this edge in clockwise order.

See also next

source§

impl<'a, V, DE, UE, F> DirectedVoronoiEdge<'a, V, DE, UE, F>
where V: HasPosition,

source

pub fn direction_vector(&self) -> Point2<V::Scalar>

Returns a vector that is parallel to the voronoi edge.

This vector is obtained by rotating the dual Delaunay edge by 90° degree The returned vector is not necessarily normalized.