diff options
author | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2019-05-23 16:53:53 +0300 |
---|---|---|
committer | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2019-05-24 13:10:13 +0300 |
commit | 24e9a881c0b5ec0c475e0992c723585ebcf1a570 (patch) | |
tree | 5d156d87f4f287e2eb85cdc32229195932b434c0 /core/bind/core_bind.h | |
parent | 1deb41226d5219346157744eed5fe85b7069c3d4 (diff) | |
download | redot-engine-24e9a881c0b5ec0c475e0992c723585ebcf1a570.tar.gz |
Expose 2D Delaunay triangulation in Geometry singleton
Can be used via scripting as `Geometry.triangulate_delaunay_2d(points)`
The interface is the same as in `Triangulate` library, returning indices
into triangulated points.
Diffstat (limited to 'core/bind/core_bind.h')
-rw-r--r-- | core/bind/core_bind.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 561449f29e..d4fa3bc735 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -404,6 +404,7 @@ public: bool is_polygon_clockwise(const Vector<Vector2> &p_polygon); Vector<int> triangulate_polygon(const Vector<Vector2> &p_polygon); + Vector<int> triangulate_delaunay_2d(const Vector<Vector2> &p_points); Vector<Point2> convex_hull_2d(const Vector<Point2> &p_points); Vector<Vector3> clip_polygon(const Vector<Vector3> &p_points, const Plane &p_plane); |