Type Alias spade::handles::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<'a, V, DE, UE, F> VertexHandle<'a, 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 counter clockwise 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<'a, V, DE, UE, F> AsRef<V> for VertexHandle<'a, 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<'a, V, DE, UE, F> Debug for VertexHandle<'a, V, DE, UE, F>

source§

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

Formats the value using the given formatter. Read more