Collection<LineSegmentXZ> segments,
Collection<VectorXZ> points) throws TriangulationException {
/* prepare data for triangulation */
Polygon triangulationPolygon = toPolygon(outerPolygon);
for (SimplePolygonXZ hole : holes) {
triangulationPolygon.addHole(toPolygon(hole));
}
//TODO collect points and constraints from segments
for (VectorXZ p : points) {
triangulationPolygon.addSteinerPoint(toTPoint(p));
}
try {
/* run triangulation */
Poly2Tri.triangulate(triangulationPolygon);
/* convert the result to the desired format */
List<DelaunayTriangle> triangles = triangulationPolygon.getTriangles();
List<TriangleXZ> result = new ArrayList<TriangleXZ>(triangles.size());
for (DelaunayTriangle triangle : triangles) {
result.add(toTriangleXZ(triangle));