blob: 8ef92f1750125f48b0c804cab7359d6211491cf3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
//! Module for turning a polygon into a number of non-overlapping triangles.
use super::{Polygon, Triangle};
use nalgebra::Scalar;
/// Uses earclipping algorithm (see https://www.geometrictools.com/Documentation/TriangulationByEarClipping.pdf)
/// to find an explanation of what exactly is happening.
/// Currently only handles simple polygons, but once the polygon struct supports holes must be
/// extended to also support those.
pub fn triangulate<T: Scalar + Copy>(_polygon: &Polygon<T>) -> Vec<Triangle<T>> {
unimplemented!()
}
|