diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-05-24 13:27:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-24 13:27:11 +0200 |
commit | 33239a5ada02ad05152fb4a0905261e8feddae9f (patch) | |
tree | c1efaa0fdfb3ec12392b1ebb3b07ebabb76b5d8d /core/bind/core_bind.cpp | |
parent | eaff86f8bdcafa9fcd3a1d14ce916c06490a4c2e (diff) | |
parent | 24e9a881c0b5ec0c475e0992c723585ebcf1a570 (diff) | |
download | redot-engine-33239a5ada02ad05152fb4a0905261e8feddae9f.tar.gz |
Merge pull request #29127 from Xrayez/geometry-delaunay-bind
Expose 2D Delaunay triangulation in Geometry singleton
Diffstat (limited to 'core/bind/core_bind.cpp')
-rw-r--r-- | core/bind/core_bind.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 7562c82e8a..ddb60e1345 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1501,6 +1501,11 @@ Vector<int> _Geometry::triangulate_polygon(const Vector<Vector2> &p_polygon) { return Geometry::triangulate_polygon(p_polygon); } +Vector<int> _Geometry::triangulate_delaunay_2d(const Vector<Vector2> &p_points) { + + return Geometry::triangulate_delaunay_2d(p_points); +} + Vector<Point2> _Geometry::convex_hull_2d(const Vector<Point2> &p_points) { return Geometry::convex_hull_2d(p_points); @@ -1674,6 +1679,7 @@ void _Geometry::_bind_methods() { ClassDB::bind_method(D_METHOD("is_polygon_clockwise", "polygon"), &_Geometry::is_polygon_clockwise); ClassDB::bind_method(D_METHOD("triangulate_polygon", "polygon"), &_Geometry::triangulate_polygon); + ClassDB::bind_method(D_METHOD("triangulate_delaunay_2d", "points"), &_Geometry::triangulate_delaunay_2d); ClassDB::bind_method(D_METHOD("convex_hull_2d", "points"), &_Geometry::convex_hull_2d); ClassDB::bind_method(D_METHOD("clip_polygon", "points", "plane"), &_Geometry::clip_polygon); |