From 7ec32b6d09c0a7302bcc0c54be41bf65a7911838 Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Sun, 5 Nov 2017 00:46:32 +0100 Subject: Basic docs for Geometry plus two new functions --- core/bind/core_bind.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/bind/core_bind.cpp') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 12b892d87..c369f4bff 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1316,6 +1316,16 @@ Vector _Geometry::triangulate_polygon(const Vector &p_polygon) { return Geometry::triangulate_polygon(p_polygon); } +Vector _Geometry::convex_hull_2d(const Vector &p_points) { + + return Geometry::convex_hull_2d(p_points); +} + +Vector _Geometry::clip_polygon(const Vector &p_points, const Plane &p_plane) { + + return Geometry::clip_polygon(p_points, p_plane); +} + Dictionary _Geometry::make_atlas(const Vector &p_rects) { Dictionary ret; @@ -1376,6 +1386,8 @@ void _Geometry::_bind_methods() { ClassDB::bind_method(D_METHOD("point_is_inside_triangle", "point", "a", "b", "c"), &_Geometry::point_is_inside_triangle); ClassDB::bind_method(D_METHOD("triangulate_polygon", "polygon"), &_Geometry::triangulate_polygon); + 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); ClassDB::bind_method(D_METHOD("make_atlas", "sizes"), &_Geometry::make_atlas); } -- cgit v1.2.3-70-g09d2