MorphoGraphX  2.0-1-227
triangle.h
Go to the documentation of this file.
1 #include <vector>
2 #include <Geometry.hpp>
3 
4 // Triangulate a polygon using the triangulation library from Jonathan Richard Shewchuk
5 // (see cpp file)
6 namespace mgx
7 {
8  /*mgx_EXPORT void triangulatePolygon(float maxArea, const std::vector<Point2f> &pList,
9  const std::vector<Point2i> &segList, std::vector<Point2f> &ptList,
10  std::vector<Point3i> &triList, std::vector<Point2i> &segtList);*/
11 
12  mgx_EXPORT void triangulatePolygon(float maxArea, const std::vector<Point2f> &pList,
13  const std::vector<Point2i> &segList, std::vector<Point2f> &ptList,
14  std::vector<Point3i> &triList, std::vector<Point2i> &segtList, bool boundary = false, bool addPointsCenter = true);
15 
16  // creates a Delauany triangulation in 2D
17  // input: list of points (pList)
18  // output: same points (ptList) and triangulation in triList
19  mgx_EXPORT void triangulateDelaunay2D(const std::vector<Point2f> &pList,
20  std::vector<Point2f> &ptList,
21  std::vector<Point3i> &triList);
22 }
Geometry.hpp
mgx
Distributed matrix library.
Definition: Assert.hpp:26
mgx::triangulatePolygon
mgx_EXPORT void triangulatePolygon(float maxArea, const std::vector< Point2f > &pList, const std::vector< Point2i > &segList, std::vector< Point2f > &ptList, std::vector< Point3i > &triList, std::vector< Point2i > &segtList, bool boundary=false, bool addPointsCenter=true)
mgx::triangulateDelaunay2D
mgx_EXPORT void triangulateDelaunay2D(const std::vector< Point2f > &pList, std::vector< Point2f > &ptList, std::vector< Point3i > &triList)