Trait rtriangulate::Point
[−]
[src]
pub trait Point<T> where
T: FloatCore, { fn x(&self) -> T; fn y(&self) -> T; }
A trait for two-dimensional points.
This is the trait your point type needs to implement to be able to be passed to the
triangulate
function.
For your convenience, a sort_points
function is provided. This function can be used in
the sort_by
or sort_unstable_by
functions on slices, and will order the points in the
order necessary for triangulate
to work (which is in ascending x
order).
Required Methods
fn x(&self) -> T
Returns the x
component of this point.
fn y(&self) -> T
Returns the y
component of this point.
Implementors
impl<T> Point<T> for TriangulationPoint<T> where
T: FloatCore,