43#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_SIMPLE_POLYGON_2D_TRIANGLE_2D_H
44#define LASS_GUARDIAN_OF_INCLUSION_PRIM_SIMPLE_POLYGON_2D_TRIANGLE_2D_H
55template <
typename T,
class DegeneratePolicy,
typename OutputIterator>
59 if (polygon.isConvex())
62 const size_t n = polygon.size() - 3;
63 for (
size_t i = 0; i < n; ++i)
65 *triangles++ =
Triangle2D<T>(polygon[0],polygon[i+1],polygon[i+2]);
76 LASS_THROW(
"triangulation of concave polygons is not implemented yet [Bramz]");
convex or concave polygon in 2D (not selfintersecting, no holes)
A very simple 2D polygon :)
set of geometrical primitives
bool triangulate(const SimplePolygon2D< T, DegenerationPolicy > &iPolygon, std::vector< Triangle2D< T > > &oTriangles)
Library for Assembled Shared Sources.