diff options
| author | Bernhard Liebl | 2017-11-05 00:46:32 +0100 |
|---|---|---|
| committer | Bernhard Liebl | 2017-11-05 07:56:27 +0100 |
| commit | 7ec32b6d09c0a7302bcc0c54be41bf65a7911838 (patch) | |
| tree | e1ea7521cb0f8256c5537d0af9562d383c2b72f3 /core/bind/core_bind.cpp | |
| parent | 3cbcf5c2ddadf1cd630137d6bd438634b8517b00 (diff) | |
| download | godot-7ec32b6d09c0a7302bcc0c54be41bf65a7911838.tar.gz godot-7ec32b6d09c0a7302bcc0c54be41bf65a7911838.tar.zst godot-7ec32b6d09c0a7302bcc0c54be41bf65a7911838.zip | |
Diffstat (limited to 'core/bind/core_bind.cpp')
| -rw-r--r-- | core/bind/core_bind.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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<int> _Geometry::triangulate_polygon(const Vector<Vector2> &p_polygon) { return Geometry::triangulate_polygon(p_polygon); } +Vector<Point2> _Geometry::convex_hull_2d(const Vector<Point2> &p_points) { + + return Geometry::convex_hull_2d(p_points); +} + +Vector<Vector3> _Geometry::clip_polygon(const Vector<Vector3> &p_points, const Plane &p_plane) { + + return Geometry::clip_polygon(p_points, p_plane); +} + Dictionary _Geometry::make_atlas(const Vector<Size2> &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); } |
