pub trait Polygonal: Topological {
fn is_convex(&self) -> bool
where
Self::Vertex: AsPosition,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional<N = U2>,
{ ... }
}
Expand description
Polygonal structure.
Polygonal
types form cycle graphs and extend Topological
types with
the additional constraint that all vertices have a degree and valence of
two. This requires at least three edges and forbids degenerate structures
like monogons.
These types are topological and do not necessarily represent geometric
concepts like polygons in the most strict sense. Polygons are only defined
in $\Reals^2$ and cannot have converged or collinear vertices, but
Polygonal
types support this kind of data. However, Polygonal
types are
often used as a geometric approximation of polygons. Moreover, Polygonal
types often contain non-geometric data, particularly index data.
Provided Methods
fn is_convex(&self) -> bool where
Self::Vertex: AsPosition,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional<N = U2>,
fn is_convex(&self) -> bool where
Self::Vertex: AsPosition,
Position<Self::Vertex>: EuclideanSpace + FiniteDimensional<N = U2>,
Determines if the polygon is convex.
This function rejects (returns false
) degenerate polygons, such as
polygons with collinear or converged vertices.