pub type FaceHandle<'a, InnerOuter, V, DE, UE, F> = DynamicHandleImpl<'a, V, DE, UE, F, FaceTag, InnerOuter>;
Expand description
Handle to a face of a triangulation.
Depending on the type parameter, the handle can refer to the outer face:
FaceHandle<'a, PossiblyOuterTag, ...>
: The face may refer to the single outer face.FaceHandle<'a, InnerTag, ...>
: The face refers to an inner triangle of the triangulation.
FaceHandle<'a, InnerTag, ...>
implements some additional methods that require it to be an inner
face - e.g. Self::vertices will return an array containing exactly 3
vertices.
Use Self::as_inner to convert from a possibly outer face to an inner face.
§Type parameters
The type parameters refer to the triangulations vertex, directed edge, undirected edge and face type. See Triangulation for more information.
See also the handles module for more general information about handles.
Aliased Type§
struct FaceHandle<'a, InnerOuter, V, DE, UE, F> { /* private fields */ }
Implementations§
Source§impl<'a, V, DE, UE, F> FaceHandle<'a, InnerTag, V, DE, UE, F>
impl<'a, V, DE, UE, F> FaceHandle<'a, InnerTag, V, DE, UE, F>
Sourcepub fn adjacent_edges(&self) -> [DirectedEdgeHandle<'a, V, DE, UE, F>; 3]
pub fn adjacent_edges(&self) -> [DirectedEdgeHandle<'a, V, DE, UE, F>; 3]
Returns the three inner edges adjacent to this face.
The edges are returned in counterclockwise order.
Sourcepub fn adjacent_edge(&self) -> DirectedEdgeHandle<'a, V, DE, UE, F>
pub fn adjacent_edge(&self) -> DirectedEdgeHandle<'a, V, DE, UE, F>
Returns an edge that is adjacent to this face.
If this face has multiple adjacent edges, any of them is returned.
Sourcepub fn vertices(&self) -> [VertexHandle<'a, V, DE, UE, F>; 3]
pub fn vertices(&self) -> [VertexHandle<'a, V, DE, UE, F>; 3]
Returns the face’s three vertices.
The vertices are returned in counterclockwise order.
Source§impl<V, DE, UE, F> FaceHandle<'_, InnerTag, V, DE, UE, F>where
V: HasPosition,
impl<V, DE, UE, F> FaceHandle<'_, InnerTag, V, DE, UE, F>where
V: HasPosition,
Source§impl<'a, V, DE, UE, F> FaceHandle<'a, InnerTag, V, DE, UE, F>
impl<'a, V, DE, UE, F> FaceHandle<'a, InnerTag, V, DE, UE, F>
Sourcepub fn distance_2(&self, query_point: Point2<V::Scalar>) -> V::Scalar
pub fn distance_2(&self, query_point: Point2<V::Scalar>) -> V::Scalar
Returns the squared distance of a point to this triangle.
The distance of a point inside the triangle is zero.
Sourcepub fn center(&self) -> Point2<V::Scalar>
pub fn center(&self) -> Point2<V::Scalar>
Returns the face’s center point.
The center point is the average position of its vertices.
Sourcepub fn circumcircle(&self) -> (Point2<V::Scalar>, V::Scalar)
pub fn circumcircle(&self) -> (Point2<V::Scalar>, V::Scalar)
Returns the face’s circumcircle center and the squared radius of the circumcircle.
The circumcircle is the unique circle that intersects all three vertices of the face.
Sourcepub fn circumcenter(&self) -> Point2<V::Scalar>
pub fn circumcenter(&self) -> Point2<V::Scalar>
Returns the face’s circumcenter.
The circumcenter is the center of the circumcircle.
Source§impl<V, DE, UE, F, InnerOuter: InnerOuterMarker> FaceHandle<'_, InnerOuter, V, DE, UE, F>
impl<V, DE, UE, F, InnerOuter: InnerOuterMarker> FaceHandle<'_, InnerOuter, V, DE, UE, F>
Source§impl<'a, V, DE, UE, F> FaceHandle<'a, PossiblyOuterTag, V, DE, UE, F>
impl<'a, V, DE, UE, F> FaceHandle<'a, PossiblyOuterTag, V, DE, UE, F>
Sourcepub fn as_inner(&self) -> Option<FaceHandle<'a, InnerTag, V, DE, UE, F>>
pub fn as_inner(&self) -> Option<FaceHandle<'a, InnerTag, V, DE, UE, F>>
Converts this possibly outer face handle into an inner face handle.
Returns None
if this handle refers to the outer face.
Sourcepub fn adjacent_edge(&self) -> Option<DirectedEdgeHandle<'a, V, DE, UE, F>>
pub fn adjacent_edge(&self) -> Option<DirectedEdgeHandle<'a, V, DE, UE, F>>
Returns an edge that is adjacent to this face.
The returned edge has this face on its left side.
Returns None
if the triangulation has only one or no vertices.