spade::handles

Type Alias VertexHandle

Source
pub type VertexHandle<'a, V, DE = (), UE = (), F = ()> = DynamicHandleImpl<'a, V, DE, UE, F, VertexTag, InnerTag>;
Expand description

Handle to a vertex of a triangulation.

Use this handle to retrieve the vertex position or its outgoing edges.

See also the handles module.

Aliased Type§

struct VertexHandle<'a, V, DE = (), UE = (), F = ()> { /* private fields */ }

Implementations§

Source§

impl<V, DE, UE, F> VertexHandle<'_, V, DE, UE, F>
where V: HasPosition,

Source

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

Returns the position of this vertex.

Source§

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

Source

pub fn out_edges( &self, ) -> CircularIterator<'a, V, DE, UE, F, CCWEdgesNextBackFn>

Returns all directed edges going out of this vertex.

The edges are returned in counterclockwise order, beginning at an arbitrary edge.

e6 e5 e4 e3 e2 e1 e0 v

A possible iteration order of v.out_edges()

Note: The returned iterator implements DoubleEndedIterator, allowing traversal in clockwise order.

Source

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

Returns an outgoing edge of this vertex.

If the vertex has multiple outgoing edges, any of them is returned.

Source

pub fn data(&self) -> &V

Returns the data associated with this vertex.

Source

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

Returns the voronoi face that corresponds to this vertex of the Delaunay triangulation.

Trait Implementations§

Source§

impl<V, DE, UE, F> AsRef<V> for VertexHandle<'_, V, DE, UE, F>

Source§

fn as_ref(&self) -> &V

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<V, DE, UE, F> Debug for VertexHandle<'_, V, DE, UE, F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more