1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Split Geometry singleton into Geometry2D and Geometry3D

Extra `_2d` suffixes are removed from 2D methods accoringly.
This commit is contained in:
Andrii Doroshenko (Xrayez)
2020-05-25 20:20:45 +03:00
parent 2709ddb163
commit 69d5de632e
70 changed files with 1503 additions and 1379 deletions

View File

@@ -31,6 +31,7 @@
#include "sprite_2d_editor_plugin.h"
#include "canvas_item_editor_plugin.h"
#include "core/math/geometry_2d.h"
#include "editor/editor_scale.h"
#include "scene/2d/collision_polygon_2d.h"
#include "scene/2d/light_occluder_2d.h"
@@ -233,7 +234,7 @@ void Sprite2DEditor::_update_mesh_data() {
computed_vertices.push_back(vtx);
}
Vector<int> poly = Geometry::triangulate_polygon(lines[j]);
Vector<int> poly = Geometry2D::triangulate_polygon(lines[j]);
for (int i = 0; i < poly.size(); i += 3) {
for (int k = 0; k < 3; k++) {