summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorMorris Tabor <80684659+mortarroad@users.noreply.github.com>2021-05-21 09:58:01 +0200
committerMorris Tabor <80684659+mortarroad@users.noreply.github.com>2021-05-22 22:35:42 +0200
commitd1bc88d426b3751a37beb9c81513ccd16c7e2860 (patch)
tree96b3ab3d650a4910c84523ed0e7e475572ee1cca /editor
parentd5f9f58b61c2430ee5fae59a0366581482a3b636 (diff)
Replace QuickHull with Bullet's convex hull computer.
The code is based on the current version of thirdparty/vhacd and modified to use Godot's types and code style. Additional changes: - extended PagedAllocator to allow leaked objects - applied patch from https://github.com/bulletphysics/bullet3/pull/3037
Diffstat (limited to 'editor')
-rw-r--r--editor/node_3d_editor_gizmos.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/node_3d_editor_gizmos.cpp b/editor/node_3d_editor_gizmos.cpp
index afafd7d195..cc261ea868 100644
--- a/editor/node_3d_editor_gizmos.cpp
+++ b/editor/node_3d_editor_gizmos.cpp
@@ -30,9 +30,9 @@
#include "node_3d_editor_gizmos.h"
+#include "core/math/convex_hull.h"
#include "core/math/geometry_2d.h"
#include "core/math/geometry_3d.h"
-#include "core/math/quick_hull.h"
#include "scene/3d/audio_stream_player_3d.h"
#include "scene/3d/baked_lightmap.h"
#include "scene/3d/collision_polygon_3d.h"
@@ -4161,7 +4161,7 @@ void CollisionShape3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
if (points.size() > 3) {
Vector<Vector3> varr = Variant(points);
Geometry3D::MeshData md;
- Error err = QuickHull::build(varr, md);
+ Error err = ConvexHullComputer::convex_hull(varr, md);
if (err == OK) {
Vector<Vector3> points2;
points2.resize(md.edges.size() * 2);